Re: Transaction (was: Re: [Dbi-interbase-devel] Re: fixing InterBase.pm and IBPerl.pm for transactio
Status: Beta
Brought to you by:
edpratomo
From: Mark D. A. <md...@di...> - 2000-08-04 23:49:12
|
> Silly me. I've just recalled that the DBI commmit() method is run > against database handle object! ($dbh->commit). > so, we violate the DBI spec if we make the transaction per statement > basis. well, it wasn't my idea :). how is this: - connect() takes options to specify the parameters used for any transactions automatically created by the driver (whether autocommit or not) - connect() takes an option called "autotxn", which is only meaningful if autocommit is off. - connect() starts an automatic transaction unless (autocommit,autotxn) = (off,off) - begin_txn($params) is a new interface function for explicit transaction control (off,off). - commit() takes an option to retain locks, and by default does not - commit() is illegal if autocommit is on. if autotxn is on, it starts a new transaction afterwards, if off it does not. - rollback() is analogous. - execute() and do() require an explicit transaction object if (off,off). illegal to provide one otherwise. -mda |