Re[2]: [Dbi-interbase-devel] Setting of transaction conduct
Status: Beta
Brought to you by:
edpratomo
From: Michael S. <mi...@ch...> - 2000-08-26 07:57:41
|
Hello Edwin, Friday, August 25, 2000, 6:45:46 PM, you wrote: EP> Michael Samanov wrote: >> Would it be bad if we could assign transaction behaviour the way, say: >> { >> local $dbh->{AutoCommit} = 0; >> $sth = $dbh->prepare("...", { ib_transaction_paramXXX => YYY, ... }); >> ... >> } EP> Why do you think it would be bad? EP> But, I'd rather to assign the transaction parameters to $dbh, in other EP> words, as database handle attributes. EP> What I have in my mind is to write a ib_set_transaction() method, to EP> replace the SET TRANSACTION command, where users can specify the txn EP> params. Or perhaps ib_set_transaction_params(), which should be followed by a $dbh->>{AutoCommit} = 0 to actually start a new trans. Aha, I see I was wrong. Transaction is not the property of the statement (so we ought not to to set it from inside of prepare), but the smth of DB handle. The blood will sweep away my disgrace. It seems strange that DBI developers didn't provide the method for setting transactions, while rollback and commit are present %-\ I see the big ideological hole in the DBI model thus. BTW, 0.20.6 is pretty handy and stable already. I don't know much about memory leaks and uninitialized pointers, but now it works JUST as I need (in contradistinction to the IBPerl based version) and don't coredump or smth. "local $dbh->{AutoCommit}" is what I needed of. You've done it just in time for me :-) Thanks! Best regards, Michael mailto:mi...@ch... |