autocommit redux

Jacob Smullyan <[email protected]> Thu, 18 Aug 2005 16:35:45 -0400
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
PyDOistas --

I haven't fixed the autocommit property for all drivers yet, but I
have made it much less important.  This property is no longer referred
to internally in dbi.  The main effect of this is that if you aren't
using transactions and are using a connection pool that you'll want to
return connections to the pool manually; since calling "del
dbiObj.conn" isn't very intuitive, I've added a dbi method,
"endConnection()", which is equivalent.  If you are using transactions
with a pool, nothing changes -- calling commit() or rollback() returns
the connection to the pool automatically.

This should also fix the (inferred if not observed) mysql bug with
insert_id() and pools.

The autocommit property should actually work for psycopg2 and sqlite,
but currently does nothing otherwise except misinform.

js

-- 
Jacob Smullyan
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDBPEhuqamFyFXXLIRAtXuAJ4ganlMFD6tf1O5msAvrjolzTEGaACeLokL
sB9JNwVTmnXGes0Wn7ShpKs=
=0FGq
-----END PGP SIGNATURE-----