[SQL-CVS] r4733 - SQLObject/trunk/docs
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2014-05-10 18:19:02
|
Author: phd Date: Sat May 10 12:18:55 2014 New Revision: 4733 Log: Merge revision 4732 from branch 1.7: document sqlhub.doInTransaction Modified: SQLObject/trunk/docs/SQLObject.txt Modified: SQLObject/trunk/docs/SQLObject.txt ============================================================================== --- SQLObject/trunk/docs/SQLObject.txt Sat May 10 12:17:50 2014 (r4732) +++ SQLObject/trunk/docs/SQLObject.txt Sat May 10 12:18:55 2014 (r4733) @@ -1432,6 +1432,13 @@ Person.select(Person.q.name=="value", forUpdate=True, connection=trans) +Method ``sqlhub.doInTransaction`` can be used to run a piece of code in +a transaction. The method accepts a callable and positional and keywords +arguments. It begins a transaction using its ``processConnection`` or +``threadConnection``, calls the callable, commits the transaction and +closes the underlying connection; it returns whatever the callable +returned. If an error occurs during call to the callable it rolls the +transaction back and reraise the exception. Automatic Schema Generation --------------------------- |