Branch Coverage

blib/lib/DBIx/ThinSQL.pm
Criterion Covered Total %
branch 118 172 68.6


line true false branch
34 0 0 unless @_
124 34 203 unless length $prefix
131 113 124 if ($ref eq '') { }
36 88 elsif ($ref eq 'DBIx::ThinSQL::query') { }
22 66 elsif ($ref eq 'DBIx::ThinSQL::list') { }
4 62 elsif ($ref eq 'DBIx::ThinSQL::table') { }
10 52 elsif ($ref eq 'DBIx::ThinSQL::values') { }
0 52 elsif ($ref eq 'DBIx::ThinSQL::case') { }
19 33 elsif ($ref eq 'DBIx::ThinSQL::expr') { }
29 4 elsif ($ref eq 'DBIx::ThinSQL::bind_value') { }
3 1 elsif ($ref eq 'DBIx::ThinSQL::quote_value') { }
1 0 elsif ($ref eq 'DBIx::ThinSQL::quote_identifier') { }
132 113 0 defined $val ? :
135 2 34 length $prefix ? :
137 0 94 if $pair->[0] =~ /UNION/
138 0 94 length $pair->[0] && $pair->[0] =~ /(JOIN)|(ON)/ ? :
140 94 0 if length $pair->[0]
144 94 0 if length $pair->[0] or length $pair->[1]
147 2 34 if length $prefix
154 0 20 if $i++
229 0 34 unless @_
241 0 34 exists $self->{'_dbix_thinsql_prepare_cached'} ? :
255 0 34 if ($@)
256 0 0 unless $prepare_ok
315 0 0 if (eval { do { require Text::Table::Tiny } }) { }
335 3 0 if $ref
354 1 1 if $ref
366 1 1 if $ref
387 1 1 if $ref
413 0 1 unless eval { do { require $path; $class->new } }
417 4 2 unless ($txn)
425 6 0 unless exists $self->{'HandleError'}
431 4 2 if (not $txn) { }
440 1 5 if ($wantarray) { }
447 3 1 if (not $txn) { }
452 3 0 unless $self->{'AutoCommit'}
456 1 0 unless $self->{'AutoCommit'}
463 4 2 unless ($txn)
468 2 4 if ($error)
471 1 1 if (not $txn) { }
476 1 0 unless $self->{'AutoCommit'}
480 1 0 unless $self->{'AutoCommit'}
484 0 2 if $@
492 1 3 $wantarray ? :
510 0 0 unless @$all
511 0 0 if wantarray
523 0 7 unless $self->{'Active'}
529 0 8 unless $self->{'Active'}
532 2 6 unless @$all
533 2 4 if wantarray
539 0 2 unless $self->{'Active'}
546 0 4 unless $self->{'Active'}
553 2 2 if wantarray
564 2 29 if ref($_[0]) =~ /DBIx::ThinSQL/
565 0 29 if ref $_[0] eq 'SCALAR'
581 0 29 if defined $self->[1]
594 0 3 if ref($_[0]) =~ /DBIx::ThinSQL/
595 0 3 if ref $_[0] eq 'SCALAR'
611 0 3 if defined $self->[1]
640 0 31 if (ref $token eq 'ARRAY') { }
2 29 elsif (ref $token eq 'HASH') { }
648 0 2 if (ref $token->{$col} eq 'SCALAR') { }
1 1 elsif (ref $token->{$col} eq 'ARRAY') { }
1 0 elsif (defined $token->{$col}) { }
671 0 2 if (not defined $val) { }
1 1 elsif (ref $val eq 'ARRAY') { }
672 0 0 $not ? :
675 1 0 if $not
677 1 0 if @$val
681 0 1 $not ? :
1 0 unless $like or $not_like or $gtlt
737 0 74 if (ref $token eq 'ARRAY') { }
771 1 93 if ($ref =~ /^DBIx::ThinSQL/) { }
31 62 elsif ($ref eq 'ARRAY') { }
7 55 elsif ($ref eq 'HASH') { }
775 20 11 if ($word =~ /((SELECT)|(ORDER)|(GROUP))/) { }
0 11 elsif ($word =~ /INSERT/) { }
1 10 elsif ($word =~ /(^AS$)|(FROM)|(JOIN)/) { }
5 5 elsif ($word eq 'VALUES') { }
800 1 4 ref $arg->[0] eq 'ARRAY' ? :
812 2 5 if ($word =~ /^((WHERE)|(ON))/) { }
1 4 elsif ($word eq 'SET') { }
4 0 elsif ($word eq 'VALUES') { }
830 0 1 ref $arg->{$_} eq 'SCALAR' ? :
854 0 8 ref $arg->{$_} eq 'SCALAR' ? :
870 0 36 if $@