Branch Coverage

blib/lib/DBD/Sprite.pm
Criterion Covered Total %
branch 15 264 5.6


line true false branch
632 0 1 if $DBD::Sprite::drh
694 1 0 if ($this)
697 1 0 unless $dbfid =~ /\.\w+$/
699 0 1 if ($dbfid =~ m[^/]) { }
701 0 0 unless (open DBFILE, "<$dbfid")
704 0 0 if $attr->{'PrintError'}
711 1 0 unless (open DBFILE, "<$ENV{'SPRITE_HOME'}/$dbfid")
713 1 0 unless (open DBFILE, "<$dbfid")
715 1 0 unless (open DBFILE, "<$ENV{'HOME'}/$dbfid")
720 1 0 unless $pgmhome =~ m[\/$] or $dbfid =~ m[^\/]
721 1 0 unless (open DBFILE, "<$pgmhome$dbfid")
725 1 0 if $attr->{'PrintError'}
741 0 0 if $dbinputs[1] eq $dbuser
742 0 0 if ($dbinputs[1] =~ s/^$dbuser\:(.*)/$dbuser/)
749 0 0 unless defined $attr->{$j}
759 0 0 if ($dbinputs[1] eq $dbuser)
764 0 0 if ($dbinputs[2] eq $crypted or $@ =~ /excessive paranoia/)
776 0 0 if ($dbinputs[0] =~ /(.*)(\..*)/) { }
810 0 0 if $attr->{'PrintError'}
821 0 1 if (defined $ENV{'SPRITE_HOME'})
846 1 0 unless (@dsources)
848 1 0 if (defined $ENV{'HOME'})
887 0 0 $command eq 'createdb' || $command eq 'dropdb' ? :
913 0 0 if defined $resptr->{'sprite_insertid'} and $resptr->{'sprite_insertid'} =~ /\d$/
915 0 0 if ($mycsr = $resptr->prepare("select $seqfield.CURRVAL from DUAL"))
918 0 0 if ($myexe = $mycsr->execute)
923 0 0 if $lastseq =~ /\d$/ and $lastseq > 0
926 0 0 if ($seqfield)
933 0 0 if ($mycsr = $resptr->prepare($sql))
936 0 0 if ($myexe = $mycsr->execute) { }
954 0 0 unless $_[0]
968 0 0 $sqlstr =~ s/^(.+)\s*limit\s+(\d+)\s*$/$1/i ? :
985 0 0 if $sqlstr =~ /(into|from|update|table|sequence)\s+(\w+)/iso
986 0 0 if $sqlstr =~ /primary_key_info\s+(\w+)/iso
987 0 0 unless ($spritefid)
989 0 0 if $sqlstr =~ s/^(\s*select\s+\w+\s*)(\(.*\))?$/$1$2 from DUAL/is
992 0 0 unless ($spritefid)
997 0 0 unless $resptr->{'sprite_attrhref'}{'sprite_CaseTableNames'}
1005 0 0 if $sqlstr =~ /from\s+([\w\.\,\s]+)\s*(?:where|order\s+by)/iso
1006 0 0 if not $joininfo and $sqlstr =~ /from\s+([\w\.\,\s]+)/iso
1008 0 0 if defined $joininfo
1010 0 0 if ($#joinfids >= 1)
1012 0 0 unless ($#joinfids == 1)
1021 0 0 unless $resptr->{'sprite_attrhref'}{'sprite_CaseTableNames'}
1040 0 0 unless $fid
1041 0 0 if (ref $resptr->{'sprite_SpritesOpen'} and ref $resptr->{'sprite_SpritesOpen'}{$fid}) { }
1053 0 0 unless ($myspriteref)
1077 0 0 $silent ? :
1078 0 0 defined $attribs->{'sprite_reclimit'} ? :
1079 0 0 defined $attribs->{'sprite_sizelimit'} ? :
1089 0 0 if ($join) { }
1101 0 0 $joinalias[$jj] ? :
1117 0 0 if $joinsql[$jj] =~ s/\s+where\s+(.+)$/ /iso
1119 0 0 unless ($jj)
1122 0 0 if ($whereclause =~ /\S/o)
1138 0 0 if $joinsql[$jj] =~ /select\s+(.+?)\s+from\s+/o
1144 0 0 if ($whereclause =~ s/\s+order\s+by\s*(.*)//iso or $joinsql[$jj] =~ s/\s+order\s+by\s*(.*)//iso)
1147 0 0 if ($jj) { }
1153 0 0 $ordbyclause =~ /^(?:$joinalias[1]|$joinfid[1])\./ ? :
1161 0 0 if $ordbyclause =~ /\S/o
1188 0 0 unless ($selectfields[0] eq '*')
1194 0 0 if $selectfields[$k] eq $j
1202 0 0 if ($addthesefields)
1204 0 0 unless $joinsql[$jj] =~ s/^\s*select\s+from\s+$joinfid[$jj]/select $addthesefields from\t$joinfid[$jj]/is
1240 0 0 if $joinsql[0]
1271 0 0 if ($dB->FETCH('AutoCommit') and $dB->FETCH('Warn'))
1280 0 0 unless defined $dB->{'sprite_SpritesOpen'}{$_}
1281 0 0 if /^(USER|ALL)_TABLES$/i
1282 0 0 unless defined ${$dB->{'sprite_SpritesOpen'}{$_};}
1284 0 0 if not defined $commitResult or $commitResult <= 0
1293 0 0 if (not shift() and $dB->FETCH('AutoCommit') and $dB->FETCH('Warn'))
1301 0 0 unless defined $dB->{'sprite_SpritesOpen'}{$s}
1302 0 0 if $s =~ /^(USER|ALL)_TABLES$/i
1303 0 0 unless defined ${$dB->{'sprite_SpritesOpen'}{$s};}
1312 0 0 if ($attr eq 'AutoCommit')
1317 0 0 if $val == 1 and not $dbh->FETCH('AutoCommit')
1321 0 0 if ($attr =~ /^sprite/o)
1336 1 0 if ($attr eq 'AutoCommit')
1337 0 0 if ($attr =~ /^sprite_/o)
1361 0 0 unless my($csr) = $dB->prepare($sqlstr, $attr)
1373 0 0 unless my $sth = $dbh->prepare('select TABLE_NAME from USER_TABLES')
1375 0 0 unless $sth->execute
1382 0 0 unless my $sth = $dbh->prepare("PRIMARY_KEY_INFO $tablename")
1384 0 0 unless $sth->execute
1449 0 0 unless $sth
1458 0 0 unless $#tables >= 0
1471 0 1 if ($drh->FETCH('AutoCommit') == 1)
1519 0 0 ref $attr ? :
1521 0 0 if ($type)
1540 0 0 @bind_values ? :
1548 0 0 if ($params and scalar @$params != $numParam)
1583 0 0 if ($#resv < 0) { }
0 0 elsif ($resv[0]) { }
1594 0 0 if (not $sth->FETCH('sprite_statement') =~ /^\s*(?:select|primary_key_info)/io) { }
1596 0 0 if ($dB->FETCH('AutoCommit') == 1)
1598 0 0 unless $spriteref->commit
1608 0 0 if ($sqlstr)
1640 0 0 unless $spriteref->{'sprite_CaseFieldNames'}
1641 0 0 unless ($spriteref->{'sprite_CaseTableNames'})
1662 0 0 unless $joinspriteref->{'sprite_CaseFieldNames'}
1665 0 0 if ($joinunion0->[$i] eq $icolnames[$j])
1684 0 0 unless $joinspriteref->{'sprite_CaseFieldNames'}
1687 0 0 if ($joinunion1->[$i] eq $jcolnames[$j])
1702 0 0 if ($tbl eq $joinfids->[1] or $tbl eq $joinalii->[1]) { }
1707 0 0 if ($fld eq $jcolnames[$j])
1721 0 0 if ($fld eq $icolnames[$j])
1746 0 0 if ($spriteref->{'sprite_CaseTableNames'}) { }
1790 0 0 if ($sth->FETCH('sprite_joinorder')) { }
1800 0 0 unless $_
1803 0 0 if ($ocolwhich[$k]) { }
1827 0 0 unless $_
1830 0 0 if ($ocolwhich[$k]) { }
1851 0 0 if ($spriteref->{'lasterror'})
1862 0 0 if (defined $retval and $retval) { }
1880 0 0 $#ocolnames >= 0 ? :
1884 0 0 unless ($spriteref->{'TYPE'})
1889 0 0 if (defined ${$$spriteref{'types'};}{$l[$i]}) { }
1904 0 0 if (do { $$spriteref{'NAME'} }->[$i] eq $j)
1923 0 0 if $spriteref->{'ASNAMES'}{$sth->{'NAME'}[$i]}
1931 0 0 if (defined $retval)
1933 0 0 $retval ? :
1944 0 0 unless $row and scalar @$row
1947 0 0 if ($longreadlen > 0) { }
1949 0 0 if ($sth->FETCH('ChopBlanks'))
1953 0 0 if (do { $$sth{'TYPE'} }->[$i] < 0)
1956 0 0 unless $row->[$i] eq $t or $sth->{'Database'}->FETCH('LongTruncOk')
1965 0 0 if ($sth->FETCH('ChopBlanks'))
1980 0 0 unless return $sth->FETCH('driver_rows') or $sth->FETCH('sprite_rows')
1988 0 0 if ($attr eq 'AutoCommit')
1997 0 0 if ($attr =~ /^sprite/o)
2012 0 0 if ($attr eq 'AutoCommit')
2013 0 0 if ($attr =~ /^sprite_/o)