Another overhaul of transaction/savepoint handling
authorPeter Rabbitson <ribasushi@cpan.org>
Tue, 26 Apr 2011 06:38:26 +0000 (08:38 +0200)
committerPeter Rabbitson <ribasushi@cpan.org>
Fri, 29 Apr 2011 22:55:23 +0000 (00:55 +0200)
commit90d7422fc60a3bad71cc67dc20106ef68046664e
tree3c945691061e3b4be55668082d85bd9d7b5f7516
parenteb7aa96091132ffd9f6256d2ff3d341102b60003
Another overhaul of transaction/savepoint handling

- Move most of the transaction logic back to ::Storage, only leave
  DBI-specific overrides in ::Storage::DBI
- Fix bug where a nested rollback would destabilize the entire execution
  chain
- Better checks for connectivity/ordering of txn/svp operations
- Make DBIC::Storage::NESTED_ROLLBACK_EXCEPTION a proper exception subclass
- Standardize the txn/svp names - renamed the actual workers
  _dbh_begin_work               to _exec_txn_begin
  _dbh_commit                   to _exec_txn_commit
  _dbh_rollback                 to _exec_txn_rollback
  _svp_[begin|release|rollback] to _exec_svp_[begin|release|rollback]
18 files changed:
Changes
lib/DBIx/Class/Storage.pm
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/ACCESS.pm
lib/DBIx/Class/Storage/DBI/ADO/MS_Jet.pm
lib/DBIx/Class/Storage/DBI/Firebird/Common.pm
lib/DBIx/Class/Storage/DBI/Informix.pm
lib/DBIx/Class/Storage/DBI/MSSQL.pm
lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm
lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm
lib/DBIx/Class/Storage/DBI/Pg.pm
lib/DBIx/Class/Storage/DBI/Replicated.pm
lib/DBIx/Class/Storage/DBI/SQLAnywhere.pm
lib/DBIx/Class/Storage/DBI/Sybase/ASE.pm
lib/DBIx/Class/Storage/DBI/Sybase/FreeTDS.pm
lib/DBIx/Class/Storage/DBI/mysql.pm
lib/DBIx/Class/Storage/TxnScopeGuard.pm
t/storage/txn.t