Branch Coverage

blib/lib/DBIx/Database.pm
Criterion Covered Total %
branch 0 334 0.0


line true false branch
72 0 0 if ($cmd)
74 0 0 if (ref $cmd eq 'ARRAY') { }
0 0 elsif (ref $cmd eq 'HASH') { }
133 0 0 if (@params > 1 and ref($bval = $params[0]) eq 'ARRAY' and ref($btype = $params[1]) eq 'ARRAY') { }
135 0 0 if ($$self{'*Debug'} > 1)
140 0 0 if (defined $sth)
144 0 0 if defined $$bval[$i] and defined $$btype[$i] and $$Numeric{$$btype[$i]}
148 0 0 defined $bt && $bt <= &DBI::SQL_CHAR() ? :
155 0 0 if $$self{'*Debug'} > 1
160 0 0 defined $ret ? :
0 0 if $$self{'*Debug'} > 2
161 0 0 if not $ret and $$self{'*Debug'}
162 0 0 if not $ret and $$self{'*Debug'} == 1
184 0 0 unless $DBIx::Database::Base::PreserveCase
189 0 0 if (defined($meta = $DBIx::Recordset::Metadata{$metakey}))
191 0 0 if $$self{'*Debug'} > 2
219 0 0 if $tab =~ /^\s*$/
222 0 0 unless $sth = &{$ListFields;}($hdl, $tab)
224 0 0 if $@
226 0 0 if ($tab =~ /^"(.*?)"$/) { }
232 0 0 $DBIx::Database::Base::PreserveCase ? :
0 0 $sth ? :
235 0 0 if ($HaveTypes and $sth) { }
265 0 0 if $sth
273 0 0 if ($$self{'*Debug'} > 2)
280 0 0 if ($$QuoteTypes{$$types[$col]}) { }
292 0 0 if ($$NumericTypes{$$types[$col]}) { }
294 0 0 if $$self{'*Debug'} > 2
300 0 0 if $$self{'*Debug'} > 2
305 0 0 if $num == 0 and $$self{'*Debug'} > 1
308 0 0 if $#tabs < 0 and $$self{'*Debug'} > 1
324 0 0 unless (exists $$meta{'*Links'})
340 0 0 unless ($tables)
344 0 0 if ($ListTables) { }
346 0 0 unless my(@tabs) = &{$ListTables;}($hdl)
354 0 0 if ($_ =~ /(^|\.)$tabfilter/i)
357 0 0 $DBIx::Database::Base::PreserveCase ? :
362 0 0 if ($$self{'*Debug'} > 3)
375 0 0 if $$self{'*TableFilter'}
378 0 0 if ($#tabs <= 0) { }
384 0 0 if ($tabfilter and $table =~ /^$tabfilter(.*?)$/)
394 0 0 if ($tabfilter and $ntab =~ /^$tabfilter(.*?)$/)
399 0 0 if ($n =~ /^(.*?)__(.*?)$/)
412 0 0 unless $ltab
414 0 0 if (not $$tables{$ltab} and $$tables{"$tf$ltab"}) { }
419 0 0 if ($$tables{$fullltab})
423 0 0 if (grep /^$lfield$/i, @$subnames)
426 0 0 if $$self{'*Debug'} > 2
444 0 0 unless $ltab
453 0 0 unless ($$meta{'*Links'}{$k})
456 0 0 if $$self{'*Debug'} > 2
507 0 0 unless my $hdl = $$self{'*DBHdl'} = 'DBI'->connect($$self{'*DataSource'}, $$self{'*Username'}, $password, $$self{'*DBIAttr'})
514 0 0 if ($$self{'*Driver'} eq 'Proxy')
518 0 0 if $$self{'*Debug'} > 1
521 0 0 if $$self{'*Debug'} > 1
524 0 0 if ($hdl and $cmd = $$self{'*DoOnConnect'})
557 0 0 if (ref $data_source eq 'HASH')
572 0 0 unless ($data_source =~ /^dbi:/i)
576 0 0 if $reconnect
577 0 0 if $keepopen and not defined $$self{'*DBHdl'}
581 0 0 if ($saveas)
584 0 0 if (defined($self = $DBIx::Recordset::Metadata{$metakey}))
586 0 0 if $reconnect
587 0 0 if $keepopen and not defined $$self{'*DBHdl'}
605 0 0 if $reconnect
608 0 0 if (ref $data_source and eval { do { $data_source->isa('DBI::db') } }) { }
618 0 0 if (not defined $$self{'*DBHdl'}) { }
628 0 0 if $$self{'*Debug'} > 1
640 0 0 unless ($tables)
645 0 0 if ($ListTables) { }
656 0 0 if ($_ =~ /(^|\.)$tabfilter/i)
659 0 0 $DBIx::Database::PreserveCase ? :
665 0 0 if ($$self{'*Debug'} > 2)
690 0 0 if $metakey
694 0 0 if (defined $$self{'*DBHdl'} and not $keepopen)
698 0 0 if $$self{'*Debug'} > 1
740 0 0 unless $DBIx::Database::PreserveCase
745 0 0 unless (defined($meta = $DBIx::Recordset::Metadata{$metakey}))
751 0 0 if defined $value
754 0 0 if exists $$meta{$key}
759 0 0 unless defined($meta = $DBIx::Recordset::Metadata{$metakey})
782 0 0 unless $DBIx::Database::PreserveCase
787 0 0 unless (defined($meta = $DBIx::Recordset::Metadata{$metakey}))
792 0 0 unless defined $key
794 0 0 if defined $value
816 0 0 unless $DBIx::Database::PreserveCase
821 0 0 unless (defined($meta = $DBIx::Recordset::Metadata{$metakey}))
826 0 0 unless defined $metadata or $clear
861 0 0 unless $DBIx::Database::PreserveCase
866 0 0 unless (defined($meta = $DBIx::Recordset::Metadata{$metakey}))
888 0 0 unless $DBIx::Database::PreserveCase
893 0 0 unless (defined($meta = $DBIx::Recordset::Metadata{$metakey}))
920 0 0 if (defined $$self{'*DBHdl'})
926 0 0 if not $orgerr and $@
927 0 0 if $orgerr and $@
961 0 0 if (ref $dbschema eq 'ARRAY') { }
967 0 0 unless open FH, $dbschema
974 0 0 if $@
1007 0 0 unless $trans
1021 0 0 unless $$tab{'!For'}{$drv}
1024 0 0 defined $user && $$db{'*Username'} ne $user ? :
1035 0 0 if ($$tables{$tabname}) { }
1047 0 0 if $createseq and $typespec eq 'counter'
1051 0 0 if ($constraints and $constraint = $$constraints{$field})
1056 0 0 if ($$constraint[$c] eq '!Name')
1065 0 0 $ncnt > 1 ? :
1070 0 0 if (not $dbfields{$field}) { }
0 0 elsif ($alterconstraints and $ccmd) { }
1073 0 0 if $createseq and $typespec eq 'counter'
1075 0 0 if ($typespec =~ /^(.*?)\s*\((.*?)\)(.*?)$/) { }
1077 0 0 $$trans{$1} ? :
1082 0 0 if $$trans{$typespec}
1084 0 0 $lastfield ? :
1088 0 0 if 'DBIx::Database'->LastError
1092 0 0 if ($init or $default)
1099 0 0 if 'DBIx::Database'->LastError
1102 0 0 if ($default and defined $$default{$field})
1105 0 0 if 'DBIx::Database'->LastError
1108 0 0 if ($init)
1113 0 0 if 'DBIx::Database'->LastError
1125 0 0 if ($constraints and $constraint = $$constraints{$field})
1130 0 0 if ($$constraint[$c] eq '!Name')
1137 0 0 $ncnt > 1 ? :
1144 0 0 if ($alterconstraints > 0)
1147 0 0 if (lc $cval eq 'null' or lc $cval eq 'not null') { }
1159 0 0 if 'DBIx::Database'->LastError
1170 0 0 if ($candropcolumn)
1174 0 0 if ($i == 1)
1181 0 0 if 'DBIx::Database'->LastError
1200 0 0 if $createseq and $typespec eq 'counter'
1202 0 0 if ($typespec =~ /^(.*?)\s*\((.*?)\)(.*?)$/) { }
1204 0 0 $$trans{$1} ? :
1209 0 0 if $$trans{$typespec}
1214 0 0 if ($constraints and $constraint = $$constraints{$field})
1219 0 0 if ($$constraint[$c] eq '!Name')
1228 0 0 $ncnt > 1 ? :
1234 0 0 $i == $#$fields - 1 ? :
1237 0 0 if $tabdef{'!PrimKey'}
1242 0 0 if 'DBIx::Database'->LastError
1246 0 0 if ($init)
1251 0 0 if 'DBIx::Database'->LastError
1257 0 0 if ($default) { }
1267 0 0 if 'DBIx::Database'->LastError
1274 0 0 if ($index)
1284 0 0 if (ref $attr eq 'HASH')
1292 0 0 if $newtab and 'DBIx::Database'->LastError
1298 0 0 if ($grant and $newtab || $setpriv)
1300 0 0 if ($createpublic)
1305 0 0 if ($setpriv and not $newtab)
1313 0 0 if $newtab and 'DBIx::Database'->LastError
1319 0 0 if ($setpriv and not $newtab)
1323 0 0 if 'DBIx::Database'->LastError
1328 0 0 if 'DBIx::Database'->LastError
1333 0 0 if ($hasseq)
1337 0 0 if ($newseq)
1344 0 0 if 'DBIx::Database'->LastError
1348 0 0 if ($grant and $newseq || $setpriv)
1350 0 0 if ($createpublic)
1355 0 0 if ($setpriv and not $newseq)
1364 0 0 if $newseq and 'DBIx::Database'->LastError
1370 0 0 if ($setpriv and not $newseq)
1375 0 0 if 'DBIx::Database'->LastError
1380 0 0 if 'DBIx::Database'->LastError
1437 0 0 if ($createpublic)
1453 0 0 if 'DBIx::Database'->LastError
1457 0 0 if ($createseq)
1467 0 0 if ($createpublic)