line |
true |
false |
branch |
49
|
19 |
2 |
if (not $file or $file eq ':memory:') { } |
|
1 |
1 |
elsif (not -e $file) { } |
57
|
0 |
1 |
unless (-d $dir) |
62
|
1 |
0 |
if (open TOUCH, '>' . $file) |
79
|
0 |
21 |
if $autocommit |
91
|
1 |
20 |
if $$self{'init'} and (ref $$self{'init'} || '') eq 'CODE' |
99
|
1 |
19 |
if ($self->created and $import || $cb) |
102
|
0 |
1 |
unless ($self->txn(sub {
if ($import) {
return -1 unless $self->import_sql($import, $import_cb);
};
if ($cb) {
local $_ = $self;
return &$cb($self);
};
return 1;
}
)) |
107
|
0 |
1 |
if ($import) |
108
|
0 |
0 |
unless $self->import_sql($import, $import_cb) |
112
|
1 |
0 |
if ($cb) |
121
|
0 |
0 |
if (index($self->file, ':') != 0) |
141
|
24 |
0 |
unless $$self{'foreign_keys'} |
169
|
1 |
21 |
unless $$self{'created'} |
172
|
0 |
21 |
if (defined $$self{'tid'} and $$self{'tid'} != 'threads'->tid) { } |
|
0 |
21 |
elsif ($$self{'pid'} != $$) { } |
196
|
0 |
1 |
unless $rv |
215
|
5 |
3 |
if ($_[-1] and ref $_[-1] and ref $_[-1] eq 'HASH') |
220
|
8 |
0 |
if (not $secure) { } |
225
|
6 |
2 |
if $rv |
238
|
0 |
0 |
if $rv |
242
|
0 |
0 |
unless $sec_value |
248
|
0 |
0 |
if $rv |
251
|
0 |
0 |
unless $sec_value |
264
|
0 |
856 |
unless my $table = $self->_table_name(\@_) |
267
|
0 |
856 |
unless $_[0] |
270
|
0 |
856 |
if ref $_[0] eq 'HASH' and ref $_[1] |
273
|
825 |
31 |
if (ref $_[0] eq 'HASH') { } |
|
31 |
0 |
elsif (ref $_[0] eq 'ARRAY') { } |
282
|
0 |
1248 |
unless ref $key or $key =~ /$DBIx::Oro::KEY_REGEX/ |
288
|
0 |
825 |
unless @keys |
293
|
0 |
825 |
if ($prop and my $oc = $$prop{-'on_conflict'}) |
294
|
0 |
0 |
if ($oc eq 'replace') { } |
|
0 |
0 |
elsif ($oc eq 'ignore') { } |
309
|
823 |
2 |
if $rv |
317
|
1 |
30 |
unless $_[1] |
330
|
76 |
7 |
unless ref $keys[$i] |
347
|
27 |
3 |
if (scalar @_ <= $max) { } |
359
|
25 |
2 |
if $rv[0] |
376
|
0 |
28 |
unless @_ |
389
|
0 |
28 |
unless $rv_part |
393
|
0 |
3 |
unless $self->txn(sub {
while (@v_array = splice(@values, 0, $max - 1)) {
@v_array = grep($_, @v_array) unless @_;
my $sub_sql = $sql . $union . (' UNION ' . $union) x (scalar(@v_array) - 1);
my $rv_part = $self->prep_and_exec($sub_sql, [map({@default, @$_;} @v_array)]);
return -1 unless $rv_part;
$rv += $rv_part;
};
}
) |
396
|
3 |
0 |
if $rv |
415
|
14 |
8 |
if $rv |
426
|
0 |
6 |
if ($rv and $type eq 'insert' and ${$$self{'autocommit'};}) |
430
|
0 |
7 |
wantarray ? : |
451
|
0 |
0 |
unless $_[0] |
456
|
0 |
0 |
unless $self->prep_and_exec('DETACH ?', [$db_name]) |
477
|
0 |
0 |
if $_[0] and $_[0] =~ /^[pcnalsx]+$/i |
482
|
0 |
0 |
if (@_) |
486
|
0 |
0 |
if $_[0] and $_[0] =~ /^[pcnalsx]+$/i |
490
|
0 |
0 |
if ($format) { } |
500
|
0 |
0 |
if (/[xals]/) |
535
|
0 |
0 |
if ($_ eq 'p' or $_ eq 'c' or $_ eq 'n') { } |
|
0 |
0 |
elsif ($_ eq 'a' or $_ eq 'l' or $_ eq 's') { } |
|
0 |
0 |
elsif ($_ eq 'x') { } |
596
|
1 |
0 |
if ($_[0]) |
600
|
1 |
0 |
if ($_[0] =~ /$arguments/) { } |
603
|
0 |
3 |
unless $_ =~ /$arguments/ |
615
|
3 |
2 |
if defined $snippet{$_} |
616
|
5 |
0 |
if $s |
626
|
1 |
0 |
if ($snippet[0]) |
659
|
0 |
0 |
if (not defined $_[0]) { } |
|
0 |
0 |
elsif ($_[0] and not $$self{'foreign_keys'}) { } |
|
0 |
0 |
elsif (not $_[0] and $$self{'foreign_keys'}) { } |
684
|
0 |
0 |
if (not defined $_[0]) { } |
694
|
0 |
0 |
if ($num and $num =~ /^\d+/o) { } |
|
0 |
0 |
elsif (not $num) { } |
695
|
0 |
0 |
if ($num > 1) { } |
713
|
0 |
0 |
if (${$$self{'_autocounter'};}) |
717
|
0 |
0 |
unless ${$$self{'in_txn'};} |
734
|
0 |
871 |
if (${$$self{'_autocounter'};}) |
738
|
0 |
0 |
unless ($auto) |
740
|
0 |
0 |
unless ${$$self{'in_txn'};} |