Branch Coverage

blib/lib/SQL/Maker/Select.pm
Criterion Covered Total %
branch 80 94 85.1


line true false branch
16 0 7 if (@_ == 1) { }
25 0 22 if (@_ == 1) { }
35 0 190 @_ == 1 ? :
68 14 163 if $$self{'subqueries'}
69 167 10 if $$self{'where'}
70 0 177 if $$self{'having'}
71 81 96 wantarray ? :
86 6 156 if (&Scalar::Util::blessed($table) and $table->can('as_sql')) { }
98 8 32 ref $table_ref eq 'ARRAY' ? :
100 5 35 if (&Scalar::Util::blessed($table) and $table->can('as_sql'))
117 8 4 if (ref $hint eq 'HASH') { }
120 8 0 ref $$hint{'list'} eq 'ARRAY' ? :
124 2 2 ref $hint eq 'ARRAY' ? :
138 40 666 if ref $label eq 'SCALAR'
147 198 49 if (@{$$self{'select'};})
149 2 196 if $$self{'distinct'}
152 0 252 if (not $alias) { }
241 11 elsif ($alias and $_ =~ /(?:^|\.)\Q$alias\E$/) { }
165 33 214 if ($$self{'joins'} and @{$$self{'joins'};})
170 33 9 unless $initial_table_written++
171 42 0 if $$join{'type'}
173 24 18 if $$join{'alias'}
175 40 2 if (defined $$join{'condition'})
176 3 37 if (ref $$join{'condition'} and ref $$join{'condition'} eq 'ARRAY') { }
3 34 elsif (ref $$join{'condition'} and ref $$join{'condition'} eq 'HASH') { }
191 2 31 if @{$$self{'from'};}
194 215 32 if ($$self{'from'} and @{$$self{'from'};})
201 157 90 if $$self{'where'}
203 247 0 if $$self{'group_by'}
204 3 244 if $$self{'having'}
205 247 0 if $$self{'order_by'}
207 24 223 if defined $$self{'limit'}
219 0 24 unless defined $n
221 5 19 if $n =~ /\D/
222 9 10 $$self{'offset'} ? :
236 208 39 unless @attrs
241 29 19 if (ref $col) { }
244 17 2 $type ? :
252 13 23 $order ? :
261 221 26 if @$elems == 0
294 115 48 $where ? :
299 3 0 if ($$self{'having'}) { }
309 3 0 if (my $orig = $$self{'select_map_reverse'}{$col})
320 0 242 $$self{'for_update'} ? :
325 27 240 $alias ? :
327 253 14 unless $hint and ref $hint eq 'HASH'
328 14 0 if ($$hint{'list'} and @{$$hint{'list'};})