"alter session set nls_timestamp_tz_format='$timestamp_tz_format'");
}
-sub _svp_begin {
- my ($self, $name) = @_;
-
- $self->dbh->do("SAVEPOINT $name");
-}
-
=head2 source_bind_attributes
Handle LOB types in Oracle. Under a certain size (4k?), you can get away
return \%bind_attributes;
}
+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 }
my $updated_cols = $self->next::method($source, $to_insert, @_);
- if ($identity_insert) {
- $dbh->do("SET IDENTITY_INSERT $table OFF");
- }
+ $dbh->do("SET IDENTITY_INSERT $table OFF") if $identity_insert;
$self->_insert_blobs($source, $blob_cols, $to_insert) if %$blob_cols;
return $id;
}
+# savepoint support using ASE syntax
+
+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");
+}
+
1;
=head1 MAXIMUM CONNECTIONS