Branch Coverage

blib/lib/DBIx/SearchBuilder.pm
Criterion Covered Total %
branch 183 234 78.2


line true false branch
221 115 2691 if (@_)
238 34 123 if ($self->{'_combine_search_and_count'})
244 114 9 unless $self->{'_bind_values'}
256 0 159 unless $records
261 36 699 if (not $self->{'count_all'} and $row->{'search_builder_count_all'})
269 0 159 if $records->err
298 11 1447 unless defined $self->{'items'}
315 2 60 if ($self->{'_combine_search_and_count'})
321 53 7 unless $self->{'_bind_values'}
322 0 60 unless $records
325 0 60 if $records->err
342 36 0 unless $self->{'_bind_values'}
367 38 144 if $self->{'columns'} and @{$self->{'columns'};}
423 109 146 if (keys %{$$self{'left_joins'};}) { }
442 0 0 if ($self->RowsPerPage) { }
444 0 0 if ($self->FirstRow != 0)
465 324 1713 if (@_) { }
498 78 68 if $self->_isLimited > 0
509 5 141 if (my $clause = $self->_GroupClause) { }
47 94 elsif (not $self->{'joins_are_distinct'} and $self->_isJoined) { }
543 59 11 if $self->_isLimited > 0
549 29 41 if ($self->_isJoined) { }
572 20 16 if $self->_isLimited > 0
579 0 36 if (my $clause = $self->_GroupClause) { }
33 3 elsif (not $self->{'joins_are_distinct'} and $self->_isJoined) { }
613 3 1248 unless $self->_isLimited
615 132 1116 if $self->{'must_redo_search'}
617 1141 107 if ($self->{'itemscount'} < $self->_RecordCount) { }
689 2 2 if $self->{'must_redo_search'}
723 4 0 @_ % 2 ? :
731 2 2 if $self->_isLimited > 0
739 4 0 if ($args{'Order'})
741 2 2 $args{'Order'} =~ /^des/i ? :
746 4 0 $list ? :
761 1 24 unless $self->_isLimited
764 21 3 if $self->{'must_redo_search'}
812 67 0 if (@_)
813 67 0 if ($self->_Handle->HasSupportForCombineSearchAndCount) { }
817 0 0 unless $unsupported_combine_search_and_count_logged
970 96 1 unless ($args{'ENTRYAGGREGATOR'})
971 2 94 if ($args{'LEFTJOIN'}) { }
982 97 0 if ($args{'OPERATOR'})
984 8 89 if ($args{'OPERATOR'} =~ /LIKE/i) { }
1 88 elsif ($args{'OPERATOR'} =~ /STARTSWITH/i) { }
1 87 elsif ($args{'OPERATOR'} =~ /ENDSWITH/i) { }
42 45 elsif ($args{'OPERATOR'} =~ /\bIN$/i) { }
994 3 39 if (&blessed($args{'VALUE'}) and $args{'VALUE'}->isa('DBIx::SearchBuilder')) { }
39 0 elsif (ref $args{'VALUE'}) { }
997 1 2 $args{'VALUE'}{'columns'} ? :
1007 39 0 if ($args{'QUOTEVALUE'}) { }
1022 10 87 if ($args{'OPERATOR'} =~ /IS/i)
1028 43 54 if ($args{'QUOTEVALUE'})
1037 0 97 unless $Alias
1044 97 0 if (defined $Alias) { }
1075 2 95 if (defined $args{'LEFTJOIN'} and not defined $args{'ALIAS'})
1081 47 50 unless ($args{'ALIAS'})
1084 47 0 if ($args{'TABLE'} eq $self->Table) { }
1108 2 95 if ($args{'LEFTJOIN'}) { }
1109 2 0 if ($args{'ENTRYAGGREGATOR'})
1123 87 10 if ($self->_Handle->CaseSensitive and defined $args{'VALUE'} and $args{'VALUE'} ne "" and $args{'VALUE'} ne "''" and not $args{'OPERATOR'} =~ /IS/ || $args{'VALUE'} =~ /^null$/i)
1125 43 44 unless ($args{'CASESENSITIVE'} or not $args{'QUOTEVALUE'})
1141 1 96 if ($self->{'_open_parens'}{$ClauseId})
1145 93 4 if (lc($args{'ENTRYAGGREGATOR'} || '') eq 'none' or not @$restriction) { }
1193 0 150 if $where_clause
1197 150 9 if $where_clause
1211 17 150 if $result
1214 173 10 if (ref $entry) { }
1259 72 1 if ($self->_OrderClause ne $old_value)
1273 175 266 unless $self->{'order_by'}
1285 116 150 if ($rowhash{'ORDER'} and $rowhash{'ORDER'} =~ /^des/i) { }
1287 0 116 if $nulls_order
1291 0 150 if $nulls_order
1293 0 266 unless defined $rowhash{'ALIAS'}
1295 266 0 if (defined $rowhash{'ALIAS'} and $rowhash{'FIELD'} and $rowhash{'ORDER'})
1299 72 194 if (length $rowhash{'ALIAS'} and $rowhash{'FIELD'} =~ /^(.*\()(.*\))$/)
1305 0 266 $clause ? :
1306 266 0 if length $rowhash{'ALIAS'}
1311 266 0 if $clause
1330 5 0 if ($self->_GroupClause ne $old_value)
1343 230 42 unless $self->{'group_by'}
1347 0 42 unless my $part = $self->CombineFunctionWithField(%$row)
1350 0 42 if $clause
1354 0 42 unless $clause
1379 0 6 @_ % 2 ? :
1385 0 6 if $self->_Handle->QuoteTableNames
1386 0 0 do { lc $type eq 'left' } ? :
0 6 $type ? :
1397 1 5 if ($args{'DISTINCT'} and not defined $self->{'joins_are_distinct'}) { }
5 0 elsif (not $args{'DISTINCT'}) { }
1494 37 392 if (@_ and ($_[0] || 0) != $self->{'show_rows'})
1521 2 1 if ($self->FirstRow - $self->RowsPerPage > 0) { }
1568 29 211 if (@_ and ($_[0] || 1) != $self->{'first_row'} + 1)
1605 7 62 unless $self->_isLimited
1607 47 15 if ($self->{'must_redo_search'})
1608 2 45 if ($self->RowsPerPage) { }
1633 0 112 unless $self->_isLimited
1638 62 50 if ($self->{'must_redo_search'} or $self->RowsPerPage and not $self->{'count_all'}) { }
17 33 elsif ($self->RowsPerPage) { }
1668 4 5 unless $self->Count
1670 3 2 if ($self->_ItemsCounter == $self->Count) { }
1748 64 2 unless (defined $column or exists $args{'AS'})
1749 60 4 if ($args{'FIELD'} and $args{'ALIAS'} eq 'main' and !$args{'TABLE'} || $args{'TABLE'} eq $self->Table) { }
1756 24 36 if ($self->{'columns'})
1758 21 3 if (grep((index($_, $suffix, -length($suffix)) >= 0), @{$$self{"columns"};}))
1767 66 2 defined $column ? :
1844 9 200 unless ($args{'FIELD'})
1849 169 31 unless $args{'FUNCTION'}
1852 0 31 if ($func =~ /^DISTINCT\s*COUNT$/i) { }
26 5 elsif ($func =~ s/\?/$field/g) { }
1 7 elsif (not $func =~ /\(/ and lc $func ne 'null') { }
1897 1 0 unless grep {/^main\.\*$/;} @{$$self{"columns"};}
1928 0 0 unless my $table = $args{'TABLE'}
1929 0 0 unless my $field = $args{'FIELD'}
1944 113 481 if @_
1963 0 275 if @_
1976 0 227 $QueryHint ? :
1987 32 220 if ($args{'PreferBind'})