Branch Coverage

blib/lib/DBIx/Class/SQLMaker.pm
Criterion Covered Total %
branch 93 122 76.2


line true false branch
141 0 0 defined $_[0]{'quote_char'} && length $_[0]{'quote_char'} ? :
148 0 0 unless wantarray or defined $_[0]{'quote_char'} and length $_[0]{'quote_char'}
151 2286 1720 defined $_ ? :
152 1019 984 ref $_[0]{'quote_char'} ? :
195 1199 139202 $_[0]{'_dequalify_idents'} && defined $_[1] && !ref($_[1]) ? :
213 7947 4 length ref $fields ? :
221 1 7949 unless length $fields
236 133 7817 if (defined $offset)
237 0 133 if $offset =~ /[^0-9]/ or $offset < 0
242 1716 6234 if (defined $limit) { }
0 6234 elsif ($offset) { }
243 0 1716 if $limit =~ /[^0-9]/ or $limit <= 0
252 1716 6234 if ($limit) { }
259 1 1715 if ($limiter = $self->can('emulate_limit')) { }
271 0 1715 unless my $dialect = $self->limit_dialect
274 0 1715 unless $limiter = $self->can("_$dialect")
280 0 1716 unless $rs_attrs
295 3 7944 if $rs_attrs->{'for'}
297 7947 0 wantarray ? :
302 40696 22880 unless delete $$self{"${_}_bind"}
313 1 1 if (ref $type eq 'SCALAR') { }
331 2 9235 if (not $_[2] or ref $_[2] eq 'HASH' and not keys %{$_[2];})
337 0 2 if (+($_[3] || {})->{'returning'})
352 2 9814 if (not length ref $fields) { }
505 9309 elsif (my $lit = &is_literal_value($fields)) { }
8425 884 elsif (ref $fields eq 'ARRAY') { }
884 0 elsif (ref $fields eq 'HASH') { }
369 1015 36470 length ref $_ ? :
383 0 884 if @toomany
387 1 2 if lc $func eq 'distinct' and ref $rhs eq 'ARRAY' and @$rhs > 1
399 14 869 length ref $rhs ? :
405 85 798 $as ? :
439 470 9628 if ($arg->{'group_by'} and @sqlbind = $self->_recurse_fields($arg->{'group_by'}))
448 97 10001 if ($arg->{'having'} and @sqlbind = $self->_recurse_where($arg->{'having'}))
457 3886 6212 if ($arg->{'order_by'})
475 6228 4053 ref $arg eq 'HASH' && !grep({$_ =~ /^-(?:desc|asc)/i;} keys %$arg) ? :
490 296 386 $1 && uc $1 eq 'DESC' ? :
498 9018 9672 if (my $ref = ref $_[1])
499 7943 1075 if ($ref eq 'ARRAY') { }
0 1075 elsif ($ref eq 'HASH') { }
1 2148 elsif ($ref eq 'REF' and ref ${$_[1];} eq 'ARRAY') { }
518 1613 1697 unless defined $join_type
520 1702 1608 $join_type ? :
539 2 3310 ref $to eq 'ARRAY' ? :
541 1699 1613 if (ref $to_jt eq 'HASH' and defined $to_jt->{'-join_type'})
548 2 3310 if (ref $to eq 'ARRAY') { }
569 9117 15555 if (not ref $fromspec) { }
2968 12587 elsif (ref $fromspec eq 'SCALAR') { }
251 12336 elsif (ref $fromspec eq 'REF' and ref $$fromspec eq 'ARRAY') { }
12336 0 elsif (ref $fromspec eq 'HASH') { }
585 0 12336 if defined $toomuch
601 13 3299 if (ref $cond eq 'HASH' and keys %$cond == 1 and (keys %$cond)[0] =~ /\./ and not ref((values %$cond)[0])) { }
0 3299 elsif (ref $cond eq 'ARRAY') { }
646 1 0 if (not ref $lhs or ref $lhs eq 'ARRAY') { }
0 0 elsif (ref $lhs eq 'SCALAR') { }
0 0 elsif (ref $lhs eq 'REF' and ref $$lhs eq 'ARRAY') { }
648 1 0 ref $lhs ? :
649 4 0 if (not ref $_) { }
0 0 elsif (ref $_ eq 'SCALAR') { }
0 0 elsif (ref $_ eq 'REF' and ref $$_ eq 'ARRAY') { }
680 1 1 unless $$_->[0] =~ /^ \s* \( .* \) \s* $/sx