On Tue, 8 Mar 2005, David Lloyd wrote:
> START TRANSACTION
> LOCK TABLE table_x WRITE
> LOCK TABLE table_y WRITE
> [do stuff that involves tables table_x, table_y, table_z all of which should
> be atomic]
> UNLOCK TABLES
> In other words, all the changes between the final LOCK and UNLOCK should all
> go in as one OR not go into the database and rollback. Furthermore, I don't
> want table_x and table_y to be writable or readable whilst I'm doing this.
> I can't quite figure out how to do this in Alzabo :(
There's certainly nothing built in. You can always get the underlying DBI
handle via $schema->driver->handle.
If you're going to be using Alzabo to "do stuff" after the lock, make sure
you start and commit with Alzabo, not the underlying handle. But that's
the only caveat.
This goes for any SQL you want to write. There's no reason you're
required to use Alzabo for all DB operations.
Your guide to all that's veg. My book blog