Branch Coverage

blib/lib/DBIx/SearchBuilder.pm
Criterion Covered Total %
branch 185 234 79.0


line true false branch
226 131 3023 if (@_)
243 42 133 if ($self->{'_combine_search_and_count'})
249 124 9 unless $self->{'_bind_values'}
261 0 177 unless $records
266 40 747 if (not defined $self->{'count_all'} and $row->{'search_builder_count_all'})
274 0 177 if $records->err
303 27 1553 unless defined $self->{'items'}
320 2 69 if ($self->{'_combine_search_and_count'})
332 66 7 unless $self->{'_bind_values'}
333 0 73 unless $records
336 0 73 if $records->err
353 44 0 unless $self->{'_bind_values'}
382 39 163 if $self->{'columns'} and @{$self->{'columns'};}
438 137 151 if (keys %{$$self{'left_joins'};}) { }
457 0 0 if ($self->RowsPerPage) { }
459 0 0 if ($self->FirstRow != 0)
480 361 1870 if (@_) { }
513 87 71 if $self->_isLimited > 0
524 5 153 if (my $clause = $self->_GroupClause) { }
55 98 elsif (not $self->{'joins_are_distinct'} and $self->_isJoined) { }
558 72 11 if $self->_isLimited > 0
564 41 42 if ($self->_isJoined) { }
587 28 16 if $self->_isLimited > 0
594 0 44 if (my $clause = $self->_GroupClause) { }
41 3 elsif (not $self->{'joins_are_distinct'} and $self->_isJoined) { }
628 3 1352 unless $self->_isLimited
630 148 1204 if $self->{'must_redo_search'}
632 1229 123 if ($self->{'itemscount'} < $self->_RecordCount) { }
704 2 2 if $self->{'must_redo_search'}
738 4 0 @_ % 2 ? :
746 2 2 if $self->_isLimited > 0
754 4 0 if ($args{'Order'})
756 2 2 $args{'Order'} =~ /^des/i ? :
761 4 0 $list ? :
776 1 26 unless $self->_isLimited
779 23 3 if $self->{'must_redo_search'}
827 83 0 if (@_)
828 83 0 if ($self->_Handle->HasSupportForCombineSearchAndCount) { }
832 0 0 unless $unsupported_combine_search_and_count_logged
985 113 1 unless ($args{'ENTRYAGGREGATOR'})
986 2 111 if ($args{'LEFTJOIN'}) { }
997 114 0 if ($args{'OPERATOR'})
999 8 106 if ($args{'OPERATOR'} =~ /LIKE/i) { }
1 105 elsif ($args{'OPERATOR'} =~ /STARTSWITH/i) { }
1 104 elsif ($args{'OPERATOR'} =~ /ENDSWITH/i) { }
58 46 elsif ($args{'OPERATOR'} =~ /\bIN$/i) { }
1009 3 55 if (builtin::blessed($args{'VALUE'}) and $args{'VALUE'}->isa(__PACKAGE__)) { }
55 0 elsif (ref $args{'VALUE'}) { }
1012 1 2 $args{'VALUE'}{'columns'} ? :
1022 55 0 if ($args{'QUOTEVALUE'}) { }
1037 11 103 if ($args{'OPERATOR'} =~ /IS/i)
1043 43 71 if ($args{'QUOTEVALUE'})
1052 0 114 unless $Alias
1059 114 0 if (defined $Alias) { }
1090 2 112 if (defined $args{'LEFTJOIN'} and not defined $args{'ALIAS'})
1096 48 66 unless ($args{'ALIAS'})
1099 48 0 if ($args{'TABLE'} eq $self->Table) { }
1123 2 112 if ($args{'LEFTJOIN'}) { }
1124 2 0 if ($args{'ENTRYAGGREGATOR'})
1138 103 11 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)
1140 43 60 unless ($args{'CASESENSITIVE'} or not $args{'QUOTEVALUE'})
1156 1 113 if ($self->{'_open_parens'}{$ClauseId})
1160 110 4 if (lc($args{'ENTRYAGGREGATOR'} || '') eq 'none' or not @$restriction) { }
1208 0 180 if $where_clause
1212 180 9 if $where_clause
1226 17 180 if $result
1229 203 10 if (ref $entry) { }
1274 89 1 if ($self->_OrderClause ne $old_value)
1288 192 327 unless $self->{'order_by'}
1300 144 183 if ($rowhash{'ORDER'} and $rowhash{'ORDER'} =~ /^des/i) { }
1302 0 144 if $nulls_order
1306 0 183 if $nulls_order
1308 0 327 unless defined $rowhash{'ALIAS'}
1310 327 0 if (defined $rowhash{'ALIAS'} and $rowhash{'FIELD'} and $rowhash{'ORDER'})
1314 74 253 if (length $rowhash{'ALIAS'} and $rowhash{'FIELD'} =~ /^(.*\()(.*\))$/)
1320 0 327 $clause ? :
1321 327 0 if length $rowhash{'ALIAS'}
1326 327 0 if $clause
1345 5 0 if ($self->_GroupClause ne $old_value)
1358 266 42 unless $self->{'group_by'}
1362 0 42 unless my $part = $self->CombineFunctionWithField(%$row)
1365 0 42 if $clause
1369 0 42 unless $clause
1394 0 6 @_ % 2 ? :
1400 0 6 if $self->_Handle->QuoteTableNames
1401 0 0 do { lc $type eq 'left' } ? :
0 6 $type ? :
1412 1 5 if ($args{'DISTINCT'} and not defined $self->{'joins_are_distinct'}) { }
5 0 elsif (not $args{'DISTINCT'}) { }
1509 53 445 if (@_ and ($_[0] || 0) != $self->{'show_rows'})
1536 2 1 if ($self->FirstRow - $self->RowsPerPage > 0) { }
1583 37 231 if (@_ and ($_[0] || 1) != $self->{'first_row'} + 1)
1620 7 63 unless $self->_isLimited
1622 48 15 if ($self->{'must_redo_search'})
1623 2 46 if ($self->RowsPerPage) { }
1648 0 129 unless $self->_isLimited
1653 71 58 if ($self->{'must_redo_search'} or $self->RowsPerPage and not defined $self->{'count_all'}) { }
25 33 elsif ($self->RowsPerPage) { }
1683 4 5 unless $self->Count
1685 3 2 if ($self->_ItemsCounter == $self->Count) { }
1763 65 2 unless (defined $column or exists $args{'AS'})
1764 61 4 if ($args{'FIELD'} and $args{'ALIAS'} eq 'main' and !$args{'TABLE'} || $args{'TABLE'} eq $self->Table) { }
1771 24 37 if ($self->{'columns'})
1773 21 3 if (grep index($_, $suffix, -length($suffix)) != -1, @{$$self{"columns"};})
1782 67 2 defined $column ? :
1859 9 218 unless ($args{'FIELD'})
1864 187 31 unless $args{'FUNCTION'}
1867 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') { }
1912 1 0 unless grep {/^main\.\*$/;} @{$$self{"columns"};}
1943 0 0 unless my $table = $args{'TABLE'}
1944 0 0 unless my $field = $args{'FIELD'}
1959 129 549 if @_
1980 1 312 if @_
1996 3 245 $QueryHint ? :
2007 32 253 if ($args{'PreferBind'})