Branch Coverage

blib/lib/Jifty/DBI/Collection.pm
Criterion Covered Total %
branch 10 210 4.7


line true false branch
84 0 0 if ref $proto
103 0 0 if $args{'handle'}
174 0 0 if (@_)
197 0 0 unless $records
202 0 0 if ($column =~ /^((\w+)_?(?:\d*))_(.*?)$/)
212 0 0 unless $order[0] and $order[-1] eq $main_pkey
217 0 0 if ($_ =~ /$table\_(.*)$/)
244 0 0 if ($class)
246 0 0 if ($class->isa('Jifty::DBI::Collection')) { }
0 0 elsif ($class->isa('Jifty::DBI::Record')) { }
273 0 0 if ($records->err)
307 0 0 unless defined $self->{'items'}
324 0 0 unless $records
327 0 0 if $records->err
329 0 0 $all ? :
390 0 0 if (%{$self->{'leftjoins'};}) { }
404 0 0 if ($self->rows_per_page) { }
406 0 0 if ($self->first_row != 0)
425 0 0 if (@_) { }
446 0 0 if ($self->_is_limited)
449 0 0 if ($self->distinct_required) { }
479 0 0 if ($self->{'columns'} and @{$self->{'columns'};}) { }
485 0 0 unless $self->preload_related
488 0 0 if (my $col_obj = $item->column($related_obj))
493 0 0 if (not $reference_type) { }
0 0 elsif ($reference_type->isa('Jifty::DBI::Collection')) { }
0 0 elsif ($reference_type->isa('Jifty::DBI::Record')) { }
527 0 0 unless $self->preload_related
529 0 0 if (my $col_obj = $self->new_item->column($related_colname))
541 0 0 if ($col->virtual) { }
595 0 0 $self->_is_joined ? :
610 0 0 if ($self->_is_limited)
615 0 0 if ($self->_is_joined) { }
637 0 0 if $self->{'must_redo_search'}
655 0 0 unless $self->_is_limited
657 0 0 if $self->{'must_redo_search'}
659 0 0 if ($self->{'itemscount'} < $self->_record_count) { }
731 0 0 unless $self->_is_limited
734 0 0 if $self->{'must_redo_search'}
745 0 0 unless $class
771 0 0 if (@_) { }
0 0 elsif (not $self->{'record_class'}) { }
772 0 0 if @_
775 0 0 unless $class =~ s/Collection$//
902 0 0 unless defined $args{'column'}
904 0 0 unless defined $args{'value'}
907 0 0 if (ref $args{'value'} and $args{'value'}->isa('Jifty::DBI::Record'))
914 0 0 if ($args{'column'})
917 0 0 if ($args{'operator'} =~ /LIKE/i) { }
0 0 elsif ($args{'operator'} =~ /MATCHES/i) { }
0 0 elsif ($args{'operator'} =~ /STARTSWITH/i) { }
0 0 elsif ($args{'operator'} =~ /ENDSWITH/i) { }
933 0 0 if ($args{'quote_value'} and not $args{'operator'} =~ /IS/i)
937 0 0 if ($] >= 5.007)
939 0 0 if (&Encode::is_utf8($args{'value'}))
955 0 0 if (defined $args{'leftjoin'} and not defined $args{'alias'})
963 0 0 unless ($args{'alias'})
966 0 0 if ($args{'table'} eq $self->table) { }
987 0 0 if ($args{'subclause'}) { }
993 0 0 if $self->DEBUG
1001 0 0 if ($args{'leftjoin'}) { }
1010 0 0 if ($self->_handle->case_sensitive and defined $args{'value'} and $args{'quote_value'} and not $args{'case_sensitive'})
1018 0 0 defined $column_obj ? :
0 0 if (defined $column_obj ? !$column_obj->is_numeric : 1)
1029 0 0 if ($self->{'_open_parens'}{$Clause})
1034 0 0 if (exists $args{'entry_aggregator'} and ($args{'entry_aggregator'} || '') eq 'none' or not $$restriction) { }
1051 0 0 if (defined $args{'alias'}) { }
1087 0 0 if (not $$restriction) { }
1121 0 0 if @subclauses
1138 0 0 if (defined $self->{'subclauses'}{'generic_restrictions'})
1152 0 0 if (($self->{$type} || '') ne ($value || ''))
1195 0 0 if (@_)
1198 0 0 unless (UNIVERSAL::isa($args[0], 'HASH'))
1216 0 3 unless $self->{'order_by'}
1227 3 6 if ($rowhash{'order'} =~ /^des/i) { }
1233 0 9 if ($rowhash{'function'}) { }
9 0 elsif (defined $rowhash{'alias'} and $rowhash{'column'}) { }
1234 0 0 $clause ? :
1242 6 3 $clause ? :
1243 7 2 if $rowhash{'alias'}
1248 3 0 if $clause
1288 0 0 unless (UNIVERSAL::isa($args[0], 'HASH'))
1303 0 0 unless $self->{'group_by'}
1315 0 0 if ($rowhash{'function'}) { }
0 0 elsif ($rowhash{'alias'} and $rowhash{'column'}) { }
1316 0 0 $clause ? :
1323 0 0 $clause ? :
1328 0 0 if ($clause) { }
1349 0 0 if ($refers_to->can('table')) { }
1458 0 0 if @_
1475 0 0 if (@_)
1508 0 0 unless $self->_is_limited
1512 0 0 if ($self->{'must_redo_search'}) { }
1515 0 0 unless $self->{'raw_rows'}
1559 0 0 unless $self->_is_limited
1563 0 0 if ($self->{'must_redo_search'} or not $self->{'count_all'}) { }
1566 0 0 unless $self->{'count_all'}
1588 0 0 unless $self->count
1590 0 0 if ($self->_items_counter == $self->count) { }
1599 0 0 if (@_)
1660 0 0 if (my $func = $args{'function'})
1661 0 0 if ($func =~ /^DISTINCT\s*COUNT$/i) { }
0 0 elsif ($func =~ /\?/) { }
0 0 elsif (not $func =~ /\(/) { }
1680 0 0 if $table eq $self->table and not $args{'alias'}