Branch Coverage

blib/lib/DBIx/TableHash.pm
Criterion Covered Total %
branch 0 176 0.0


line true false branch
577 0 0 $OrDie ? :
0 0 unless my $ThisObject = tie(%$ThisHash, $Class, $Params)
601 0 0 unless $Params
641 0 0 ref $ClassOrObj ? :
0 0 ref $Params eq 'HASH' ? :
645 0 0 $this->initialize ? :
689 0 0 unless ref $$this{'FixedKeys'} eq 'HASH'
690 0 0 unless ref $$this{'RetrieveFields'} eq 'ARRAY'
695 0 0 unless $$this{'Database'}
696 0 0 unless $$this{'TableName'}
697 0 0 unless $$this{'KeyField'}
704 0 0 $$this{'ValueField'} ? :
712 0 0 unless /^\w+$/
716 0 0 unless $this->Connect
727 0 0 keys %{$$this{'FixedKeys'};} ? :
732 0 0 keys %{$$this{'FixedKeys'};} ? :
737 0 0 keys %{$$this{'FixedKeys'};} ? :
746 0 0 @{$$this{'RetrieveFields'};} ? :
754 0 0 if $$this{'CacheMode'} eq 'CacheOneTime'
792 0 0 if ($$this{'_CacheHash'} and not $All and not $NoCache)
800 0 0 $All ? :
804 0 0 unless $sth = $dbh->prepare("SELECT $SelectClause FROM $$this{'TableName'} \n\t\t\t\t\t\t\t\t\t WHERE $WhereClause $$this{'FixedKeyValsWhereClause'} ORDER BY $$this{'KeyField'}") and $sth->execute
818 0 0 unless $ResultHash
825 0 0 $$this{'ValueField'} ? :
835 0 0 $All ? :
837 0 0 if $sth
861 0 0 unless $$this{'ValueField'} or keys %$ValuesHash
866 0 0 unless keys %$ValuesHash
870 0 0 unless $dbh->do("LOCK TABLES $$this{'TableName'} WRITE")
877 0 0 unless $sth = $dbh->prepare("SELECT $$this{'KeyField'} FROM $$this{'TableName'} \n\t\t\t\t\t\t\t\t\t WHERE $$this{'KeyField'} = '${KeyName}' $$this{'FixedKeyValsWhereClause'}") and $sth->execute
887 0 0 if ($Existing) { }
893 0 0 unless $sth = $dbh->prepare("UPDATE $$this{'TableName'} SET $UpdateFieldsEqualValues \n\t\t\t\t\t\t WHERE $$this{'KeyField'} = '${KeyName}' $$this{'FixedKeyValsWhereClause'}") and $sth->execute
908 0 0 unless $sth = $dbh->prepare("INSERT INTO $$this{'TableName'} ($$this{'KeyField'}, $InsertFieldNames $$this{'FixedKeyValsKeyList'}) \n\t\t\t\t\t\t\t\t\t\t\t VALUES ('${KeyName}', $InsertValueNames $$this{'FixedKeyValsValueList'})") and $sth->execute
917 0 0 if $$this{'_CacheHash'}
921 0 0 if $TablesLocked
923 0 0 if $sth
936 0 0 if $$this{'_CacheHash'}
940 0 0 unless $sth = $dbh->prepare("SELECT $$this{'KeyField'} FROM $$this{'TableName'} \n\t\t\t\t\t\t\t\t\t WHERE $$this{'KeyField'} = '${KeyName}' $$this{'FixedKeyValsWhereClause'}") and $sth->execute
948 0 0 if $sth
967 0 0 unless $sth = $dbh->prepare("DELETE FROM $$this{'TableName'} \n\t\t\t\t\t\t\t\t\t WHERE $$this{'KeyField'} = '${KeyName}' $$this{'FixedKeyValsWhereClause'}") and $sth->execute
975 0 0 if $$this{'_CacheHash'}
977 0 0 if $sth
991 0 0 unless $sth = $dbh->prepare("DELETE FROM $$this{'TableName'} \n\t\t\t\t\t\t\t\t\t WHERE 1 $$this{'FixedKeyValsWhereClause'}") and $sth->execute
998 0 0 if $sth
1026 0 0 if $$this{'_CacheHash'} and $$this{'CacheMode'} eq 'CacheOneTime'
1035 0 0 if (defined $$this{'CacheMode'} and $$this{'CacheMode'} ne 'CacheNone')
1037 0 0 unless $dbh->do("LOCK TABLES $$this{'TableName'} READ")
1048 0 0 unless $sth = $dbh->prepare("SELECT $$this{'KeyField'} FROM $$this{'TableName'} \n\t\t\t\t\t\t\t\t\t WHERE 1 $$this{'FixedKeyValsWhereClause'} ORDER BY $$this{'KeyField'}") and $sth->execute
1064 0 0 if (defined $$this{'CacheMode'} and $$this{'CacheMode'} ne 'CacheNone')
1071 0 0 if $TablesLocked
1072 0 0 if $sth
1116 0 0 ref $Value eq 'HASH' ? :
0 0 $$this{'ValueField'} ? :
1163 0 0 $$this{'HostName'} ? :
0 0 $$this{'Port'} ? :
0 0 unless $$this{'_dbh'} = 'DBI'->connect(join(':', 'DBI', $$this{'DBIDriver'}, $$this{'Database'}, $$this{'HostName'} ? $$this{'HostName'} : (), $$this{'Port'} ? $$this{'Port'} : ()), $$this{'Login'}, $$this{'Password'})
1184 0 0 if $$this{'_dbh'}
1204 0 0 unless defined $TableName and length $TableName
1205 0 0 unless defined $Fields and $Fields and keys %$Fields
1210 0 0 $Replace ? :
1212 0 0 unless $dbh->do("$ReplaceOrInsert into $TableName ($FieldsList) values ($ValuesList)")
1247 0 0 unless defined $TableName and length $TableName
1248 0 0 unless defined $SearchFields and $SearchFields and keys %$SearchFields
1249 0 0 unless defined $ReplaceFields and $ReplaceFields and keys %$ReplaceFields
1254 0 0 unless $dbh->do("update $TableName set $SetClause where $WhereClause")
1277 0 0 unless defined $TableName and length $TableName
1278 0 0 unless $QueryString
1288 0 0 unless $sth = $dbh->prepare($QueryString) and $sth->execute
1302 0 0 if $sth
1318 0 0 unless defined $TableName and length $TableName
1321 0 0 keys %$SearchSpec ? :
1325 0 0 unless $sth = $dbh->prepare("select * from $TableName $WhereClause") and $sth->execute
1339 0 0 if $sth
1355 0 0 unless defined $TableName and length $TableName
1358 0 0 keys %$SearchSpec ? :
1362 0 0 unless $sth = $dbh->prepare("delete from $TableName $WhereClause") and $sth->execute
1370 0 0 if $sth
1386 0 0 unless defined $TableName and length $TableName
1388 0 0 $JoinTable ? :
1391 0 0 $JoinTable && $JoinFields && @{$JoinFields ||= [];} ? :
1395 0 0 $$SearchSpec{$_} =~ s/^([=<>]+)// ? :
0 0 keys %$SearchSpec || @$JoinClauses ? :
1399 0 0 unless $JoinRetrieveFields
0 0 $JoinTable ? :
1401 0 0 $JoinTable ? :
1403 0 0 if $JoinTable
1407 0 0 unless $sth = $dbh->prepare($Query) and $sth->execute
1421 0 0 if $sth