Oracle/Storage/FKDeferral.pm

filter: Statementstmt 63.6% 14 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 4 / 8 Podpod 0.0% 0 / 1 totaltotal 58.0% 18 / 31 CC 1 SCAR 4.1
CC
1
Cov
64%
with_deferred_fk_checks
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.5
« PK/Auto/Oracle.pm ↑ Summary Oracle/Storage/Savepoints.pm »
1 package DBIO::Oracle::Storage::FKDeferral;
2 # ABSTRACT: FK constraint deferral for Oracle
3  
4 23 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 23 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 23 our $VERSION = '0.900007';
8  
9 23 ▶use DBIO::Util qw( scope_guard );
Subroutine BEGIN: called CC=1 SCAR=0.0
10 23 ▶use Context::Preserve 'preserve_context';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12  
13  
14 0 ▶sub with_deferred_fk_checks {
Subroutine with_deferred_fk_checks: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my ($self, $sub) = @_;
16  
17 0 my $txn_scope_guard = $self->txn_scope_guard;
18  
19 0 $self->_do_query('alter session set constraints = deferred');
20  
21 0 ▶ my $sg = scope_guard {
Subroutine __ANON__: not called CC=1 SCAR=6.9
22 0 $self->_do_query('alter session set constraints = immediate');
23 0 };
24  
25 0 ▶ return preserve_context { $sub->() } after => sub { $txn_scope_guard->commit };
Subroutine __ANON__: not called CC=1 SCAR=6.9
Subroutine __ANON__: not called CC=1 SCAR=6.9
26 }
27  
28 23 1;
29  
30 __END__
« PK/Auto/Oracle.pm ↑ Summary Oracle/Storage/Savepoints.pm »