Re: Transaction (was: Re: [Dbi-interbase-devel] Re: fixing InterBase.pm and IBPerl.pm for transact
Status: Beta
Brought to you by:
edpratomo
From: Edwin P. <ed....@co...> - 2000-08-04 17:12:52
|
Edwin Pratomo wrote: > > > > ib has a SET TRANSACTION as well, through i don't think there is any > > need for us to use it, since we can set all the flags via options. > > below is some xs code i sent karwin for use in IBPerl for creating transactions > > with arbitrary flags (currently IBPerl does not implement any parameters > > for txn creation). > > I'm aware of this. the problem is where I should put these options. > Current implementation puts the interbase transaction handle within the > imp_dbh structure. Changing transaction parameters will affect all > statements from the same $dbh (DBI database handle). > Alternatively, we can put the trans handle within the imp_sth structure. > the consequence is there will be a separate transaction for each > statement, but we gain flexibility, because we can pass the transaction > parameters to the DBI prepare() method. 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. Rgds, Edwin. |