X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage.pm;h=e57a48ba7121bb0d1fa0d641c31851791e6a53ed;hb=0c90fabe2d883d5a51ee47491b6c9af2c5f53e60;hp=cd296017be03e18cd0bb21920d2f44db566206e9;hpb=ace385bdd8012c9fc766315a74cedff3700fff43;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage.pm b/lib/DBIx/Class/Storage.pm index cd29601..e57a48b 100644 --- a/lib/DBIx/Class/Storage.pm +++ b/lib/DBIx/Class/Storage.pm @@ -8,6 +8,7 @@ use base qw/DBIx::Class/; use Scalar::Util qw/weaken/; use Carp::Clan qw/^DBIx::Class/; use IO::File; +use DBIx::Class::Storage::TxnScopeGuard; __PACKAGE__->mk_group_accessors('simple' => qw/debug debugobj schema/); __PACKAGE__->mk_group_accessors('inherited' => 'cursor_class'); @@ -261,6 +262,53 @@ which allows the rollback to propagate to the outermost transaction. sub txn_rollback { die "Virtual method!" } +=head2 svp_begin + +Arguments: $savepoint_name? + +Created a new savepoint using the name provided as argument. If no name +is provided, a random name will be used. + +=cut + +sub svp_begin { die "Virtual method!" } + +=head2 svp_release + +Arguments: $savepoint_name? + +Release the savepoint provided as argument. If none is provided, +release the savepoint created most recently. This will implicitly +release all savepoints created after the one explicitly released as well. + +=cut + +sub svp_release { die "Virtual method!" } + +=head2 svp_rollback + +Arguments: $savepoint_name? + +Rollback to the savepoint provided as argument. If none is provided, +rollback to the savepoint created most recently. This will implicitly +release all savepoints created after the savepoint we rollback to. + +=cut + +sub svp_rollback { die "Virtual method!" } + +=for comment + +=head2 txn_scope_guard + +Return an object that does stuff. + +=cut + +sub txn_scope_guard { + return DBIx::Class::Storage::TxnScopeGuard->new($_[0]); +} + =head2 sql_maker Returns a C object - normally an object of class @@ -390,6 +438,15 @@ only. sub select_single { die "Virtual method!" } +=head2 reload_row ($row) + +given a L object, loads and returns the matching version from +storage. Does not effect the existing row object. + +=cut + +sub reload_row { die "Virtual method!" } + =head2 columns_info_for Returns metadata for the given source's columns. This @@ -421,7 +478,8 @@ Old name for DBIC_TRACE =head1 SEE ALSO -L - reference storage inplementation using SQL::Abstract and DBI. +L - reference storage implementation using +SQL::Abstract and DBI. =head1 AUTHORS