Re[2]: [Dbi-interbase-devel] 0.21 alpha released
Status: Beta
Brought to you by:
edpratomo
From: Michael S. <mi...@ch...> - 2000-09-09 17:12:14
|
Hello Mark, Saturday, September 09, 2000, 6:35:18 PM, you wrote: MDA> i don't think it should be called "tr", to distinguish it from a MDA> transaction handle -- these are just transaction parameters. MDA> could be "TransParams" or something. That definitely would be better. My suggestion was only draft. >> $tr = $dbh->begin(\%params). MDA> there will always be other options, and for symmetry, i think this should be: MDA> begin({TransParams => \%params}); Very reasonable, too. >> This transaction object has the same methods as $dbh has, i.e. >> prepare, execute, selectrow_array and others. MDA> What I would like is for the methods to all support a {Trans => $tr} or {TransParams => $string} or {TransParams =>> $hash} in their options argument. MDA> In other words, i don't see a need to make the transaction handle also be MDA> an object with methods, though I suppose it couldn't hurt. This simply didn't cross my mind, but $tr->commit is more elegant, I hope, than $dbh->commit(Trans => $tr), so $tr->prepare(...) looks slightly shorter and clearer than $dbh->prepare(..., {Trans => $tr}). BTW, it $dbh and $sth seem to have the method or the property returning the current transaction. Smth like $dbh->tr or $dbh->{Trans}. The one issue else: what must we do with transaction on it's destroying? If it's enough just commit or rollback, maybe the parameter named, say, AutoCommit will be useful. MDA> You actually have two proposals above -- one on how to specify parameters, MDA> and one on how to change the api. Thank you, your words sound like nectar and ambrosia taste :-) MDA> Both seem fine to me, but in the end it is Edwin who rules.... I don't think anybody will refuse the working improvements :-) Best regards, Michael mailto:mi...@ch... |