]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add connection.close()
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Sep 2012 15:02:02 +0000 (11:02 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 11 Sep 2012 15:02:02 +0000 (11:02 -0400)
doc/build/orm/session.rst

index d5a471fa1bec4dbec9c3c67a3646db9fda313e48..38d508a9c1b762c2aabb0e0010e951fc9be833d8 100644 (file)
@@ -1490,6 +1490,9 @@ entire database interaction is rolled back::
             self.trans.rollback()
             self.session.close()
 
+            # return connection to the Engine
+            self.connection.close()
+
 Above, we issue :meth:`.Session.commit` as well as
 :meth:`.Transaction.rollback`. This is an example of where we take advantage
 of the :class:`.Connection` object's ability to maintain *subtransactions*, or