]> 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 0784362fb7fbc3e768d23b84698b8556515df0cc..c3989dc8a57288386171a1c4fecfd3663de2afd5 100644 (file)
@@ -1555,6 +1555,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