| 1 | package DBIO::Oracle::Storage::Savepoints; | ||
| 2 | # ABSTRACT: Savepoint management for Oracle | ||
| 3 | |||
| 4 | 24 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 24 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 24 | our $VERSION = '0.900007'; | |
| 8 | |||
| 9 | |||
| 10 | 0 | ▶ | sub _exec_svp_begin { |
|
Subroutine
_exec_svp_begin: not called CC=1 SCAR=6.9
| |||
| 11 | 0 | my ($self, $name) = @_; | |
| 12 | 0 | $self->_dbh->do("SAVEPOINT $name"); | |
| 13 | } | ||
| 14 | |||
| 15 | # Oracle auto-releases savepoint on same-name reuse; no-op is correct | ||
| 16 | 0 | ▶ | sub _exec_svp_release { 1 } |
|
Subroutine
_exec_svp_release: not called CC=1 SCAR=6.9
| |||
| 17 | |||
| 18 | 0 | ▶ | sub _exec_svp_rollback { |
|
Subroutine
_exec_svp_rollback: not called CC=1 SCAR=6.9
| |||
| 19 | 0 | my ($self, $name) = @_; | |
| 20 | 0 | $self->_dbh->do("ROLLBACK TO SAVEPOINT $name"); | |
| 21 | } | ||
| 22 | |||
| 23 | # DBD::Oracle warns loudly on partial execute_for_fetch failures | ||
| 24 | 2 | ▶ | sub _dbh_execute_for_fetch { |
|
Subroutine
_dbh_execute_for_fetch: called CC=1 SCAR=0.0
| |||
| 25 | # arguments: ($self, $source, $sth, ...) -- the attribute is the sth's | ||
| 26 | 2 | local $_[2]->{PrintWarn} = 0; | |
| 27 | 2 | shift->next::method(@_); | |
| 28 | } | ||
| 29 | |||
| 30 | 24 | 1; | |
| 31 | |||
| 32 | __END__ | ||