[Bast-commits] r7124 -
DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sun Jul 26 16:04:29 GMT 2009
Author: caelum
Date: 2009-07-26 16:04:29 +0000 (Sun, 26 Jul 2009)
New Revision: 7124
Modified:
DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI/MSSQL.pm
Log:
SAVEPOINT methods for MSSQL
Modified: DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI/MSSQL.pm
===================================================================
--- DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-07-25 20:52:17 UTC (rev 7123)
+++ DBIx-Class/0.08/branches/mssql_storage_minor_refactor/lib/DBIx/Class/Storage/DBI/MSSQL.pm 2009-07-26 16:04:29 UTC (rev 7124)
@@ -103,6 +103,23 @@
sub last_insert_id { shift->_identity }
+# savepoint syntax is the same as in Sybase ASE
+
+sub _svp_begin {
+ my ($self, $name) = @_;
+
+ $self->dbh->do("SAVE TRANSACTION $name");
+}
+
+# A new SAVE TRANSACTION with the same name releases the previous one.
+sub _svp_release { 1 }
+
+sub _svp_rollback {
+ my ($self, $name) = @_;
+
+ $self->dbh->do("ROLLBACK TRANSACTION $name");
+}
+
sub build_datetime_parser {
my $self = shift;
my $type = "DateTime::Format::Strptime";
More information about the Bast-commits
mailing list