line |
true |
false |
branch |
58
|
57 |
935 |
unless ref $attrs->{'from'} eq 'ARRAY' and @{$attrs->{'from'};} > 1 and ref $attrs->{'from'}[0] eq 'HASH' and ref $attrs->{'from'}[1] eq 'ARRAY' and $self->_use_join_optimizer |
78
|
237 |
698 |
if $attrs->{'_force_prune_multiplying_joins'} or $attrs->{'group_by'} |
101
|
1485 |
130 |
if not defined $j->[0]{'-alias'} or $need_joins{$j->[0]{'-alias'}} |
108
|
2616 |
222 |
$need_joins{$_} ? : |
130
|
0 |
87 |
unless ref $attrs->{'from'} eq 'ARRAY' and @{$attrs->{'from'};} > 1 and ref $attrs->{'from'}[0] eq 'HASH' and ref $attrs->{'from'}[1] eq 'ARRAY' |
147
|
15 |
72 |
if delete $inner_attrs->{'_order_is_artificial'} or not $inner_attrs->{'rows'} |
158
|
20 |
0 |
ref $node eq 'ARRAY' && ref $node->[0] eq 'HASH' ? : |
|
87 |
20 |
ref $node eq 'HASH' ? : |
163
|
87 |
0 |
if (($h->{'-alias'} || '') eq $root_alias and $h->{'-rsrc'}) |
170
|
0 |
87 |
unless $root_node |
181
|
432 |
322 |
if $colinfo->{$sel} and $colinfo->{$sel}{'-source_alias'} ne $root_alias |
184
|
17 |
305 |
if (ref $sel eq 'HASH') { } |
|
295 |
20 |
elsif (not ref $sel and my $ci = $colinfo->{$sel}) { } |
211
|
219 |
400 |
unless $_->{'-seen_columns'} |
218
|
0 |
546 |
unless my $ci = $colinfo->{$_} |
219
|
37 |
509 |
if ($ci->{'-source_alias'} eq $root_alias and not $$selected_root_columns{$ci->{'-colname'}}++) |
238
|
87 |
0 |
unless $self->{'_use_join_optimizer'} |
250
|
39 |
6 |
if (grep {$_ ne $root_alias;} keys %{{} unless $inner_aliastypes->{'multiplying'};} and !$inner_aliastypes->{'grouping'} || $inner_attrs->{'_grouped_by_distinct'}) |
251
|
0 |
87 |
unless $inner_aliastypes->{'multiplying'} |
267
|
0 |
39 |
unless my(@pks) = map({"$root_alias.$_";} $root_node->{'-rsrc'}->primary_columns) |
270
|
0 |
39 |
unless $cur_sel->{$col}++ |
273
|
0 |
39 |
$inner_select_with_extras ? : |
308
|
17 |
69 |
if ($root_node_offset) { } |
340
|
200 |
144 |
unless $outer_aliastypes->{$_} |
348
|
109 |
10 |
if ($outer_select_chain->{$alias}) { } |
|
8 |
2 |
elsif (grep {$_->{$alias};} @outer_nonselecting_chains) { } |
355
|
6 |
2 |
$outer_aliastypes->{'multiplying'}{$alias} ? : |
363
|
2 |
4 |
if ($may_need_outer_group_by and $attrs->{'_grouped_by_distinct'}) |
421
|
0 |
1076 |
if ref $attrs->{'from'} ne 'ARRAY' |
432
|
1798 |
990 |
if ref $j eq 'ARRAY' |
434
|
8 |
2780 |
unless my $al = $j->{'-alias'} |
440
|
835 |
1945 |
if ref $node eq 'ARRAY' and not $j->{'-is_single'} |
447
|
986 |
1794 |
unless $j->{'-join_path'} |
|
358 |
2422 |
if grep {$aliases_by_type->{'multiplying'}{$_};} grep({$_ ne $al;} map({values %$_;} @{[] unless $j->{'-join_path'};})) |
471
|
977 |
99 |
unless (defined $sql_maker->{'quote_char'} and length $sql_maker->{'quote_char'}) |
503
|
274 |
5121 |
length ref $_ ? : |
511
|
346 |
370 |
ref $_ ? : |
514
|
86 |
990 |
ref $attrs->{'from'}[0] eq 'ARRAY' ? : |
525
|
1908 |
8060 |
$_ =~ /^\s*$/ ? : |
|
0 |
9968 |
length ref $_ ? : |
|
417 |
9968 |
!defined($_) ? : |
560
|
1064 |
12 |
$all_unq_columns ? : |
583
|
12685 |
3862 |
if (defined $matches[$i]) |
588
|
10088 |
2597 |
if defined $matches[$i + 1] |
600
|
36 |
3278 |
unless $unq_col_re |
604
|
2496 |
2496 |
unless defined $_ |
605
|
0 |
2496 |
unless my $alias = $colinfo->{$_}{'-source_alias'} |
652
|
399 |
14 |
if (not ref $_ or ref $_ ne 'HASH') |
655
|
0 |
399 |
if ($colinfos->{$_} and not $_ =~ /\./) |
663
|
44 |
66 |
unless my(@order_by) = $self->_extract_order_criteria($attrs->{'order_by'}) |
681
|
0 |
166 |
if $order_by[$o_idx][0] =~ /^ (?: min | max ) \s* \( .+ \) $/xi |
685
|
1 |
2 |
if (@{$order_by[$o_idx];} != 1 or not $chunk_ci = $$colinfos{$order_by[$o_idx][0]} and $attrs->{'_aliastypes'}) |
696
|
3 |
163 |
unless $chunk_ci |
699
|
88 |
75 |
if $group_index{$chunk_ci->{'-fq_colname'}} |
708
|
61 |
14 |
if $group_already_unique |
711
|
16 |
59 |
if ($group_already_unique and not $aliastypes->{'multiplying'}{$chunk_ci->{'-source_alias'}} and not $aliastypes->{'premultiplied'}{$chunk_ci->{'-source_alias'}}) { } |
737
|
105 |
40 |
ref $_ eq 'ARRAY' ? : |
750
|
40 |
19 |
$is_desc ? : |
760
|
1 |
65 |
if $leftovers |
764
|
46 |
19 |
if (@new_order_by) |
770
|
46 |
19 |
@new_order_by ? : |
777
|
39 |
18 |
$_[2] ? : |
786
|
22 |
900 |
unless wantarray |
789
|
900 |
0 |
$orig_quote_chars ? : |
796
|
221 |
140 |
ref $_ ? : |
801
|
253 |
108 |
unless $chunk->[0] =~ s/^ $lq (.+?) $rq $sep $lq (.+?) $rq $/"$1.$2";/ex |
810
|
0 |
922 |
if ($sql_maker) { } |
830
|
27 |
3 |
$where ? : |
|
0 |
30 |
unless my(@cols) = (map({$_->[0];} $self->_extract_order_criteria($order_by)), $where ? keys %{extract_equality_conditions($where);} : ()) |
835
|
30 |
0 |
keys %$colinfo ? : |
850
|
77 |
10 |
if $src->_identifying_column_set($_) |
865
|
0 |
43 |
unless defined $nodes |
871
|
0 |
43 |
unless @ord_cols |
884
|
17 |
94 |
unless my $colinfo = $colinfos->{$col} |
887
|
8 |
86 |
unless $$valid_aliases{$colinfo->{'-source_alias'}} |
892
|
85 |
1 |
if $colinfo->{'-source_alias'} eq $attrs->{'alias'} |
898
|
8 |
35 |
unless $seen_main_src_cols |
907
|
25 |
1 |
$colinfos->{$_} && $colinfos->{$_}{'-source_alias'} eq $attrs->{'alias'} ? : |
908
|
18 |
17 |
$attrs->{'where'} ? : |
914
|
35 |
0 |
$attrs->{'result_source'}->_identifying_column_set([keys %$seen_main_src_cols, @$main_src_fixed_cols_from_cond]) ? : |