Branch Coverage

blib/lib/DBIx/Class/SQLMaker.pm
Criterion Covered Total %
branch 85 118 72.0


line true false branch
48 5 3 defined $_[0]{'quote_char'} && length $_[0]{'quote_char'} ? :
55 0 0 unless wantarray or defined $_[0]{'quote_char'} and length $_[0]{'quote_char'}
58 4614 1714 defined $_ ? :
59 2062 1102 ref $_[0]{'quote_char'} ? :
102 1202 135642 $_[0]{'_dequalify_idents'} && !ref($_[1]) ? :
123 133 7770 if (defined $offset)
124 0 133 if $offset =~ /\D/ or $offset < 0
129 1676 6227 if (defined $limit) { }
0 6227 elsif ($offset) { }
130 0 1676 if $limit =~ /\D/ or $limit <= 0
139 1676 6227 if ($limit) { }
146 1 1675 if ($limiter = $self->can('emulate_limit')) { }
157 0 1675 unless my $dialect = $self->limit_dialect
160 0 1675 unless $limiter = $self->can("_$dialect")
166 0 1676 unless $rs_attrs
181 3 7897 if $rs_attrs->{'for'}
183 7900 0 wantarray ? :
188 40532 22668 unless delete $$self{"${_}_bind"}
199 1 1 if (ref $type eq 'SCALAR') { }
217 2 9204 if (not $_[2] or ref $_[2] eq 'HASH' and not keys %{$_[2];})
223 0 2 if (+($_[3] || {})->{'returning'})
238 43178 9773 unless $ref
239 84 9689 if $ref eq 'SCALAR'
241 8388 1301 if ($ref eq 'ARRAY') { }
880 421 elsif ($ref eq 'HASH') { }
421 0 elsif ($ref eq 'REF' and ref $$fields eq 'ARRAY') { }
258 0 880 if (@toomany)
262 1 2 if (lc $func eq 'distinct' and ref $rhs eq 'ARRAY' and @$rhs > 1)
271 85 794 $as ? :
303 480 9659 if ($arg->{'group_by'})
304 480 0 if (my($group_sql, @group_bind) = $self->_recurse_fields($arg->{'group_by'}))
310 99 10040 if (defined $arg->{'having'})
316 3850 6289 if (defined $arg->{'order_by'})
327 6221 4017 if (ref $arg eq 'HASH' and not grep({$_ =~ /^-(?:desc|asc)/i;} keys %$arg)) { }
344 647 912 $1 && uc $1 eq 'DESC' ? :
352 8981 9636 if (my $ref = ref $_[1])
353 7896 1085 if ($ref eq 'ARRAY') { }
0 1085 elsif ($ref eq 'HASH') { }
1 2168 elsif ($ref eq 'REF' and ref ${$_[1];} eq 'ARRAY') { }
372 1542 1738 unless defined $join_type
374 1743 1537 $join_type ? :
393 2 3280 ref $to eq 'ARRAY' ? :
395 1740 1542 if (ref $to_jt eq 'HASH' and defined $to_jt->{'-join_type'})
402 2 3280 if (ref $to eq 'ARRAY') { }
423 9027 15579 if (not ref $fromspec) { }
3028 12551 elsif (ref $fromspec eq 'SCALAR') { }
248 12303 elsif (ref $fromspec eq 'REF' and ref $$fromspec eq 'ARRAY') { }
12303 0 elsif (ref $fromspec eq 'HASH') { }
439 0 12303 if defined $toomuch
455 13 3269 if (ref $cond eq 'HASH' and keys %$cond == 1 and (keys %$cond)[0] =~ /\./ and not ref((values %$cond)[0])) { }
0 3269 elsif (ref $cond eq 'ARRAY') { }
495 0 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') { }
497 0 0 ref $lhs ? :
498 0 0 if (not ref $_) { }
0 0 elsif (ref $_ eq 'SCALAR') { }
0 0 elsif (ref $_ eq 'REF' and ref $$_ eq 'ARRAY') { }
529 0 0 unless $$_->[0] =~ /^ \s* \( .* \) \s* $/sx