Branch Coverage

blib/lib/Jifty/DBI/Handle.pm
Criterion Covered Total %
branch 82 164 50.0


line true false branch
98 1 31 if ($args{'driver'} and not $self->isa('Jifty::DBI::Handle::' . $args{'driver'}))
101 1 0 if ($self->_upgrade_handle($args{'driver'}))
113 31 0 if (not $self->dbh && $self->dbh->ping or $self->dsn ne $dsn)
148 0 1 if $@
229 0 0 if @_
241 0 0 if @_
271 1 996 if (@_)
296 0 0 if (@_)
317 6 0 unless $$self{'_logsqlhooks'}
362 0 0 if @_
375 56 1 if ($self->dbh) { }
392 31 1222 if @_
470 0 56 unless grep {defined $_;} values %{$args{'primary_keys'};}
477 0 56 if ($args{'is_sql_function'}) { }
529 292 209 if @_
532 3 498 unless ($sth)
535 0 3 if ($Jifty::DBI::Handle::DEBUG) { }
551 13 579 if (ref $bind_values[$bind_idx] eq 'HASH')
564 6 492 if ($self->log_sql_statements)
575 0 498 if ($@ || !$executed and not $self->dbh->ping)
580 0 0 if ($retry_simple_query)
586 6 492 if ($self->log_sql_statements)
592 1 497 if ($@ or not $executed)
596 0 1 if ($Jifty::DBI::Handle::DEBUG) { }
632 1 0 if ($sth) { }
671 0 0 unless (defined $$self{'database_version'})
683 0 0 if $sth
692 0 0 if $args{'short'}
737 0 0 if ($self->_case_insensitivity_valid($column, $operator, $value))
739 0 0 if (ref $value eq 'ARRAY') { }
762 260 0 if ($] >= 5.007)
764 0 260 if (&Encode::is_utf8($tmp))
783 0 1 if ($Jifty::DBI::Handle::TRANSDEPTH > 0)
790 1 0 if ($rv)
805 0 1 unless ($Jifty::DBI::Handle::TRANSDEPTH)
810 0 1 if ($Jifty::DBI::Handle::TRANSDEPTH > 1)
817 1 0 if ($rv)
837 0 0 unless ($dbh)
843 0 0 if ($force)
849 0 0 if ($Jifty::DBI::Handle::TRANSDEPTH == 0)
854 0 0 if ($Jifty::DBI::Handle::TRANSDEPTH > 1)
861 0 0 if ($rv)
904 0 246 if ($per_page)
906 0 0 if ($first)
948 0 12 if ($args{'table2'} and UNIVERSAL::isa($args{'table2'}, 'Jifty::DBI::Collection'))
951 0 0 ref $args{'table2'} ? :
952 0 0 if ($args{'operator'} eq '=')
954 0 0 if ($x->type eq 'serial' or $x->distinct)
962 3 9 if ($args{'alias2'}) { }
963 3 0 if ($args{'collection'}{'joins'}{$args{'alias2'}} and lc $args{'collection'}{'joins'}{$args{'alias2'}}{'type'} eq 'cross') { }
973 0 0 if ($args{'collection'}{'joins'}{$args{'alias2'}} and lc $args{'collection'}{'joins'}{$args{'alias2'}}{'type'} eq 'cross') { }
999 8 4 if ($args{'type'} =~ /LEFT/i) { }
1010 0 12 if $args{'class2'}
1011 0 12 if $args{'entry_aggregator'}
1053 19 57 ref $_ ? :
1072 0 328 if (my(@not_processed) = grep((!$processed{$_}), keys %$joins))
1104 11 3 if $self->may_be_null('collection', $args{'collection'}, 'alias', $join)
1137 0 14 if grep(($_ ne 'generic_restrictions'), keys %{$args{'collection'}{'subclauses'};})
1142 0 10 if @conditions
1151 15 1 if $$join{'type'} eq 'LEFT'
1152 0 1 unless $$join{'depends_on'} and $$join{'depends_on'} eq $args{'alias'}
1161 4 10 unless @conditions
1165 33 13 if (not ref $_) { }
10 3 elsif ($$_{'column'} =~ /^\Q$args{'alias'}.\E/) { }
0 3 elsif ($$_{'value'} and $$_{'value'} =~ /^\Q$args{'alias'}.\E/) { }
1187 0 0 if ($conditions[$i] and $conditions[$i] eq '(') { }
0 0 elsif ($conditions[$i] and $conditions[$i] eq ')') { }
1192 0 0 unless $count
1202 10 3 unless @conditions or @tmp
1204 3 35 if (not $e) { }
6 29 elsif ($e eq '1') { }
23 6 elsif ($e eq '(') { }
6 0 elsif ($e eq ')') { }
1205 1 2 if ($conditions[0] eq ')')
1211 2 0 if ($aggreg eq 'OR') { }
0 0 elsif ($aggreg eq 'AND') { }
1224 5 1 if ($conditions[0] eq ')')
1230 0 1 if ($aggreg eq 'OR') { }
1 0 elsif ($aggreg eq 'AND') { }
1243 15 8 if ($conditions[1] eq ')') { }
1396 0 0 unless ($is_available_driver)
1423 30 0 unless $self->dbh and $self->dbh and eval { do { $self->dbh->{'InactiveDestroy'} } }