[Dbix-class] Proposed patch and tests for a txn_do() method in Schema

Justin Guenther jguenther at gmail.com
Fri Feb 24 02:08:45 CET 2006


Hello all,

Attached is a patch that I've worked out with the help of the good
people of #dbix-class. Its changes include:

- Added DBIx::Class::Storage class, with virtual methods that
DBIx::Class::Storage::DBI redefines
- Made DBIx::Class::Storage::DBI a subclass of DBIx::Class::Storage
- Added an exception class
DBIx::Class::Storage::NESTED_ROLLBACK_EXCEPTION, which helps
DBIx::Class::Schema::txn_do() differentiate between a nested rollback
being propagated and a rollback failing.
- Added tests for txn_do(), including successful transactions
returning values in both scalar and list context, successful nested
transactions, failed transactions (both nested and not) and failed
transactions with a failed rollback

Comments? Suggestions? Anything I've missed as far as being
exception-safe is concerned?


   Justin Guenther
-------------- next part --------------
A non-text attachment was scrubbed...
Name: txn_do.patch
Type: application/octet-stream
Size: 9894 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/dbix-class/attachments/20060223/a101fae4/attachment.obj 


More information about the Dbix-class mailing list