[DB-SIG] Behaviour of .commit()/.rollback() when autocommit=True

Denis S. Otkidach ods at strana.ru
Wed Nov 19 03:52:31 EST 2003


On Tue, 18 Nov 2003, Dieter Maurer wrote:

DM>  > Only 1) and 2) are acceptable.  Rollback MUST raise
DM> exception if
DM>  > it ever called since transaction can't be rolled back.
DM>
DM> I disagree: the transaction can be rolled back, at it is
DM> always empty...
DM>
DM> But, as was already pointed out: the DB-API specification
DM> gives you
DM> right and me wrong.

BTW, I dislike implicit transactions as specified in DB API and
prefer to execute BEGIN explicitly in auto-commit mode.  Together
with multilevel transaction objects (see
http://cvs.sf.net/viewcvs.py/ppa/qps/qDB/qSQL.py?rev=HEAD&view=auto
for sample implementation) it's the most convenient way to use
transactions in OO programs.

--
"Explicit is better than implicit" (The Zen of Python by Tim
Peters)
--
Denis S. Otkidach
http://www.python.ru/ [ru]




More information about the DB-SIG mailing list