[DB-SIG] Transaction start

Gerhard Häring haering_postgresql@gmx.de
Mon, 27 May 2002 01:05:42 +0200

* Federico Di Gregorio <fog@initd.org> [2002-05-27 00:56 +0200]:
> Il sab, 2002-05-25 alle 06:17, Gerhard Häring ha scritto:
> > The DB-API Connection object has commit and rollback methods, but it
> > lacks a begin method.
> > 
> > Not considering the implementation of an autocommit feature, does this
> > mean that the DB-API module must implicitely start, and possibly roll
> > back transactions at certain points?
> > 
> > I guess a cursor.execute must start a new transaction, where else must a
> > transaction be started? Could anybody please clarify this?
> if the db support transactions a new transaction is started:
> 1. after .connect(), any moment just before the first .execute()
> 2. after .commit() or .rollback(), any time before next .execute()

Thanks, that's also what pyPgSQL currently seems to implement. I just
weren't sure why it was done this way.

Now I can try to implement transactions the right way in PySQLite.


mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9  3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))