Branch Coverage

blib/lib/SQL/Maker/Select.pm
Criterion Covered Total %
branch 87 98 88.7


line true false branch
16 0 7 if (@_ == 1) { }
25 0 22 if (@_ == 1) { }
35 0 209 @_ == 1 ? :
68 15 179 if $self->{'subqueries'}
69 177 17 if $self->{'where'}
70 6 188 if $self->{'having'}
71 86 108 wantarray ? :
78 38 171 if ($col)
87 6 171 if (&Scalar::Util::blessed($table) and $table->can('as_sql')) { }
99 11 33 ref $table_ref eq 'ARRAY' ? :
101 7 37 if (&Scalar::Util::blessed($table) and $table->can("as_sql"))
106 2 42 if (&Scalar::Util::blessed($joins->{'table'}) and $joins->{'table'}->can("as_sql"))
123 8 6 if (ref $hint eq 'HASH') { }
126 8 0 ref $hint->{'list'} eq 'ARRAY' ? :
130 2 4 ref $hint eq 'ARRAY' ? :
144 50 724 if ref $label eq "SCALAR"
153 216 51 if (@{$self->{'select'};})
156 2 214 if $self->{'distinct'}
159 233 47 if (not $alias) { }
30 17 elsif ($alias and $_ =~ /(?:^|\.)\Q$alias\E$/) { }
172 37 230 if ($self->{'joins'} and @{$self->{'joins'};})
177 37 9 unless $initial_table_written++
178 44 2 if $join->{'type'}
180 26 20 if $join->{'alias'}
182 44 2 if (defined $join->{'condition'})
183 3 41 if (ref $join->{'condition'} and ref $join->{'condition'} eq 'ARRAY') { }
3 38 elsif (ref $join->{'condition'} and ref $join->{'condition'} eq 'HASH') { }
198 2 35 if @{$self->{'from'};}
201 231 36 if ($self->{'from'} and @{$self->{'from'};})
208 167 100 if $self->{'where'}
210 267 0 if $self->{'group_by'}
211 7 260 if $self->{'having'}
212 267 0 if $self->{'order_by'}
214 24 243 if defined $self->{'limit'}
226 0 23 unless defined $n
228 5 18 if $n =~ /\D/
230 8 10 $self->{'offset'} ? :
243 228 39 unless @attrs
248 29 19 if (ref $col) { }
251 17 2 $type ? :
259 13 23 $order ? :
268 241 26 if @$elems == 0
301 125 48 $where ? :
306 7 0 if ($self->{'having'}) { }
316 3 0 if (my $orig = $self->{'select_map_reverse'}{$col})
335 0 262 $self->{'for_update'} ? :
340 30 257 $alias ? :
342 271 16 unless $hint and ref $hint eq "HASH"
343 16 0 if ($hint->{'list'} and @{$hint->{'list'};})