[Dbix-class] Manual Transaction Handling for Sybase ?

Jonathan Yu jonathan.i.yu at gmail.com
Wed Jul 8 20:12:47 GMT 2009


On Wed, Jul 8, 2009 at 4:04 PM, Robert Buels<rmb32 at cornell.edu> wrote:
> Jonathan Yu wrote:
>>
>> Could DBD::Sybase or maybe DBIx::Class be patched to ignore the first
>> ->begin, so that everything works normally even for Sybase?
>
> I seem to recall that in postgres at least, if you BEGIN multiple times, the
> later ones are ignored.  So starting a transaction without your knowledge
> doesn't really have any practical consequences, because if you  BEGIN again
> and either COMMIT or ROLLBACK.  Perhaps it's a similar thing with Sybase?
Hrm. That's good for Postgres.

My concern is just for portability of code -- if I write some code to:
begin_txn
do some stuff
commit_txn

I should be able to change the backend database easily and have
everything work normally. That's the idea, anyway.



More information about the DBIx-Class mailing list