bricas: Brian Cassidy <bricas@cpan.org>
+caelum: Rafael Kitover <rkitover@cpan.org>
+
captainL: Luke Saunders <luke.saunders@gmail.com>
castaway: Jess Robinson
This interface is preferred over using the individual methods L</txn_begin>,
L</txn_commit>, and L</txn_rollback> below.
+WARNING: If you are connected with C<AutoCommit => 0> the transaction is
+considered nested, and you will still need to call L</txn_commit> to write your
+changes when appropriate. You will also want to connect with C<auto_savepoint =>
+1> to get partial rollback to work, if the storage driver for your database
+supports it.
+
+Connecting with C<AutoCommit => 1> is recommended.
+
=cut
sub txn_do {
}
}
-sub _svp_begin {
- my ($self, $name) = @_;
-
- $self->dbh->do("SAVEPOINT $name");
-}
-
-# Would've implemented _svp_release here, but Oracle doesn't support it.
-
-sub _svp_rollback {
- my ($self, $name) = @_;
-
- $self->dbh->do("ROLLBACK TO SAVEPOINT $name")
-}
-
1;
=head1 NAME
sub datetime_parser_type { return "DateTime::Format::Oracle"; }
+sub _svp_begin {
+ my ($self, $name) = @_;
+
+ $self->dbh->do("SAVEPOINT $name");
+}
+
+# Oracle automatically releases a savepoint when you start another one with the
+# same name.
+sub _svp_release { 1 }
+
+sub _svp_rollback {
+ my ($self, $name) = @_;
+
+ $self->dbh->do("ROLLBACK TO SAVEPOINT $name")
+}
+
=head1 AUTHORS
Andy Grundman <andy@hybridized.org>