Re[2]: [Dbi-interbase-devel] 0.21 alpha released
Status: Beta
Brought to you by:
edpratomo
From: Michael S. <mi...@ch...> - 2000-09-09 06:52:00
|
Hello Mark, Friday, September 08, 2000, 2:57:56 AM, you wrote: MDA> i know where you are coming from; i waffled back and forth while writing it. MDA> in the end, i decided to use the exact naming and syntax of the SET TRANSACTION MDA> statement in interbase embedded sql, because it obviates the need for MDA> extended documentation. i've learned not to underestimate the pain of MDA> deviating needlessly from an already-documented interface. MDA> unfortunately, those keywords don't map particularly well to the underlying isc C api, MDA> nor to traditional transactional theory, which bothers me too. MDA> of course, we could accept both, i suppose... What do you think about my suggestion? I offered the following: Any database connection has the default transaction that is controlled by AutoCommit attribute and by the additional attributes of "prepare", "do" and the like methods. $sth = $dbh->prepare("select ...", { tr => \%params }); Besides that the user may assign as many named transactions as he (we Russuan call user ALWAYS "he" ;-) ) likes by the syntax: $tr = $dbh->begin(\%params). This transaction object has the same methods as $dbh has, i.e. prepare, execute, selectrow_array and others. This model doesn't conflict with "SET TRANSACTION" syntax because the parameters can be named the same, so you need not to develop your own documentation. So, $tr = - $dbh->begin({ write => 1, wait => 0, isolation => 'snapshot', using => [$dbh1, $dbh2], reserving => [ { shared => 1, write => 0, names => [qw(table1 table2)], }, { shared => 0, write => 1, names => [qw(table3 table4)], } ] }); I would like this, but you, of course, may disallow it, and I would do nothing with it but to resent and to write my transactions by my own :-) Best regards, Michael mailto:mi...@ch... |