]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
some docstrings etc
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 19 Feb 2006 00:35:54 +0000 (00:35 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 19 Feb 2006 00:35:54 +0000 (00:35 +0000)
doc/build/content/docstrings.myt
lib/sqlalchemy/mapping/objectstore.py

index 8d0d3b6b330fbe3f088f5b7a08dc44e5d286d875..67e6f8f2a8638a88034f6dc330c9d011ce1c4b87 100644 (file)
@@ -7,6 +7,7 @@
     import sqlalchemy.sql as sql
     import sqlalchemy.pool as pool
     import sqlalchemy.mapping as mapping
+    import sqlalchemy.exceptions as exceptions
 </%init>
 
 
@@ -15,5 +16,7 @@
 <& pydoc.myt:obj_doc, obj=sql, classes=[sql.Compiled, sql.ClauseElement, sql.TableImpl, sql.ColumnImpl] &>
 <& pydoc.myt:obj_doc, obj=pool, classes=[pool.DBProxy, pool.Pool, pool.QueuePool, pool.SingletonThreadPool] &>
 <& pydoc.myt:obj_doc, obj=mapping &>
-<& pydoc.myt:obj_doc, obj=mapping.objectstore, classes=[mapping.objectstore.Session, mapping.objectstore.UnitOfWork] &>
+<& pydoc.myt:obj_doc, obj=mapping.objectstore, classes=[mapping.objectstore.Session, mapping.objectstore.Session.SessionTrans, mapping.objectstore.UnitOfWork] &>
+<& pydoc.myt:obj_doc, obj=exceptions &>
+
 </&>
index aa8e9fe2ec25689b1f8b9cde87a1cd09a6443ee6..8f5f4eb0be42e120f3cffaf8d7ab924b91f20052 100644 (file)
@@ -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."""