diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-02-19 00:35:54 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2006-02-19 00:35:54 +0000 |
| commit | 9c8336870a85bffd2945ecd97627d5ed72b55cc9 (patch) | |
| tree | 39cb9b8438caecc5e5ebdace615d0eaf9e538258 /lib/sqlalchemy | |
| parent | 6d442d2471a34c848abf51951460d9066a708aa7 (diff) | |
| download | sqlalchemy-9c8336870a85bffd2945ecd97627d5ed72b55cc9.tar.gz | |
some docstrings etc
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/mapping/objectstore.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sqlalchemy/mapping/objectstore.py b/lib/sqlalchemy/mapping/objectstore.py index aa8e9fe2e..8f5f4eb0b 100644 --- a/lib/sqlalchemy/mapping/objectstore.py +++ b/lib/sqlalchemy/mapping/objectstore.py @@ -84,14 +84,17 @@ class Session(object): get_row_key = staticmethod(get_row_key) class SessionTrans(object): + """returned by Session.begin(), denotes a transactionalized UnitOfWork instance. + call commit() on this to commit the transaction.""" def __init__(self, parent, uow, isactive): self.__parent = parent self.__isactive = isactive self.__uow = uow - isactive = property(lambda s:s.__isactive) - parent = property(lambda s:s.__parent) - uow = property(lambda s:s.__uow) + isactive = property(lambda s:s.__isactive, doc="True if this SessionTrans is the 'active' transaction marker, else its a no-op.") + parent = property(lambda s:s.__parent, doc="returns the parent Session of this SessionTrans object.") + uow = property(lambda s:s.__uow, doc="returns the parent UnitOfWork corresponding to this transaction.") def begin(self): + """calls begin() on the underlying Session object, returning a new no-op SessionTrans object.""" return self.parent.begin() def commit(self): """commits the transaction noted by this SessionTrans object.""" |
