[Dbix-class] Savepoint support (MySQL, Pg and Oracle)
Matt S Trout
dbix-class at trout.me.uk
Tue Oct 23 21:34:31 GMT 2007
On Mon, Oct 22, 2007 at 07:26:06PM -0500, Cory Watson wrote:
> We recently wanted to use savepoints for some things in our tests and
> I decided to implement support in DBIC.
> Support is implemented vix txn_??-esque type calls of svp_begin,
> svp_rollback and svp_release. Storage/DBI.pm checks for an
> implemented _svp_??? method and executes it (or warns if it doesn't
> exist). Calls to debugobj are made if a call to the DBI subclass is
> going to happen. svp_ calls must happen inside a transaction (checks
> that transaction_depth != 0).
> I implemented support in mysql ($dbh->do()), Pg (pg_savepoint and
> friends) and Oracle ($dbh->do, but does not support svp_release, per
> oracle docs).
> No tests are included as SQLite doesn't support savepoints. I intend
> to add some if I find there are optional MySQL/Pg/Oracle tests in the
> distro. I'll look into that later.
Branch from 09/trunk to 09/branches/savepoints. All three of those DBs
already have optional tests.
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
More information about the DBIx-Class