Condition Coverage

blib/lib/SQL/Abstract/Tree.pm
Criterion Covered Total %
condition 156 182 85.7


and 3 conditions

line !l l&&!r l&&r condition
325 371 24107 80096 defined $token and length $token
24478 0 80096 defined $token and length $token and $token =~ /\S/
343 77236 13459 7026 $state == 2 and $tokens->[0] eq ')'
45441 31106 14148 $state == 1 and $tokens->[0] =~ /$expr_term_re/x
67010 9484 53 $state == 4 and $tokens->[0] =~ /$rhs_term_re/x
68512 7360 622 $state == 5 and $tokens->[0] eq ',' || $tokens->[0] =~ /$expr_term_re/x
359 2634 27893 0 @$tokens and $tokens->[0] eq '(' || $tokens->[0] =~ /$placeholder_re/x
375 1 3092 420 @right && $op eq $right[0][0]
395 22 3264 0 @{$right[0];} && $right[0][0] eq '-LIST'
412 8999 76 0 $op eq 'BETWEEN' and $right[0] eq '-LITERAL'
460 1327 21440 302 @$tokens and not $tokens->[0] =~ /$all_std_keywords_re/x
10 282 10 @$tokens > 1 && $tokens->[1] eq '('
22767 10 292 @$tokens and not $tokens->[0] =~ /$all_std_keywords_re/x and not @$tokens > 1 && $tokens->[1] eq '('
481 22102 272 33 $left[$i][0] =~ /$compressable_node_re/x and $left[$i + 1][0] =~ /$compressable_node_re/
528 64 483 150 $depth == 0 and defined $starters{lc $keyword}
565 2 15 13947 $tree and @$tree
574 0 0 13947 defined $op and ref $op || defined $args
619 12 614 63 ref $args eq 'ARRAY' && @{$args;} == 1 && $args->[0][0] eq '-PAREN'
645 0 2938 58126 ref $ast and ref $ast->[1]
655 30268 37 49088 ref $child && @$child
663 95 618 5966 $parent_op ne 'IN' and @{$child->[1];} == 1
713 5514 452 $parent_op ne 'IN' and @{$child->[1];} == 1 and $child->[1][0][0] eq '-PAREN'
674 636 1582 4009 ($child_op_argc || !1) && ref $child->[1][0][1][0] eq 'ARRAY'
682 4768 5 1454 $parent_op =~ /$unrollable_ops_re/xi and $single_child_op ne 'SELECT'
4638 135 0 $single_child_op eq $parent_op and $parent_op eq 'AND' || $parent_op eq 'OR'
3081 1561 0 $single_child_op eq '-LITERAL' || $single_child_op eq '-PLACEHOLDER' and $parent_op eq 'AND' || $parent_op eq 'OR' || $parent_op eq 'NOT'
2645 273 1719 $parent_op eq 'AND' || $parent_op eq 'OR' and $single_child_op =~ /$binary_op_re/x
2918 4 1715 $parent_op eq 'AND' || $parent_op eq 'OR' and $single_child_op =~ /$binary_op_re/x and $single_child_op ne 'BETWEEN'
277 0 1715 $parent_op eq 'AND' || $parent_op eq 'OR' and $single_child_op =~ /$binary_op_re/x and $single_child_op ne 'BETWEEN' and $child_op_argc == 2
33 1682 0 $single_child_op =~ /$alphanum_cmp_op_re/x && $parent_op =~ /$alphanum_cmp_op_re/x
4 0 1715 $parent_op eq 'AND' || $parent_op eq 'OR' and $single_child_op =~ /$binary_op_re/x and $single_child_op ne 'BETWEEN' and $child_op_argc == 2 and not $single_child_op =~ /$alphanum_cmp_op_re/x && $parent_op =~ /$alphanum_cmp_op_re/x
634 2272 16 $single_child_op and $parent_op =~ /$alphanum_cmp_op_re/x
2906 7 9 $single_child_op and $parent_op =~ /$alphanum_cmp_op_re/x and not $single_child_op =~ /$alphanum_cmp_op_re/
2279 0 9 $single_child_op and $parent_op =~ /$alphanum_cmp_op_re/x and not $single_child_op =~ /$alphanum_cmp_op_re/ and $child_op_argc == 1
7 9 0 $single_child_op and $parent_op =~ /$alphanum_cmp_op_re/x and not $single_child_op =~ /$alphanum_cmp_op_re/ and $child_op_argc == 1 and $single_grandchild_op eq '-PAREN' || $single_grandchild_op eq '-LITERAL' || $single_grandchild_op eq '-PLACEHOLDER'
3 634 2276 $parent_op ne 'ROW_NUMBER() OVER' and $single_child_op
637 30 2246 $parent_op ne 'ROW_NUMBER() OVER' and $single_child_op and $single_child_op ne 'NOT'
664 668 1578 $parent_op ne 'ROW_NUMBER() OVER' and $single_child_op and $single_child_op ne 'NOT' and $child_op_argc == 1
698 1573 5 $parent_op ne 'ROW_NUMBER() OVER' and $single_child_op and $single_child_op ne 'NOT' and $child_op_argc == 1 and $single_grandchild_op eq '-PAREN'
802 0 131 8 @{$ast->[1];} == 1 and $ast->[1][0][0] eq '-ASC'
0 59 72 @{$ast->[1];} == 1 and $ast->[1][0][0] eq '-LIST'

or 2 conditions

line l !l condition
532 11 0 $_[0]->indent_string or ''
11 0 $_[0]->indent_amount || 0
545 9 0 shift @{$bindargs;} || ''
592 0 0 $self->newline || ''

or 3 conditions

line l !l&&r !l&&!r condition
283 0 1 0 $merger ||= do { require Hash::Merge; my $m = 'Hash::Merge'->new; $m->specify_behavior({'SCALAR', {'SCALAR', sub { $_[1]; } , 'ARRAY', sub { [$_[0], @{$_[1];}]; } , 'HASH', sub { $_[1]; } }, 'ARRAY', {'SCALAR', sub { $_[1]; } , 'ARRAY', sub { $_[1]; } , 'HASH', sub { $_[1]; } }, 'HASH', {'SCALAR', sub { $_[1]; } , 'ARRAY', sub { [values %{$_[0];}, @{$_[1];}]; } , 'HASH', sub { Hash::Merge::_merge_hashes($_[0], $_[1]); } }}, 'SQLA::Tree Behavior'); $m }
343 10149 7026 90695 not @$tokens or $state == 2 and $tokens->[0] eq ')'
7026 14148 76547 not @$tokens or $state == 2 and $tokens->[0] eq ')' or $state == 1 and $tokens->[0] =~ /$expr_term_re/x
14148 53 76494 not @$tokens or $state == 2 and $tokens->[0] eq ')' or $state == 1 and $tokens->[0] =~ /$expr_term_re/x or $state == 4 and $tokens->[0] =~ /$rhs_term_re/x
3286 606 4090 $tokens->[0] eq ',' || $tokens->[0] =~ /$expr_term_re/x
53 725 75769 not @$tokens or $state == 2 and $tokens->[0] eq ')' or $state == 1 and $tokens->[0] =~ /$expr_term_re/x or $state == 4 and $tokens->[0] =~ /$rhs_term_re/x or $state == 5 and $tokens->[0] eq ',' || $tokens->[0] =~ /$expr_term_re/x
359 360 19 27514 $tokens->[0] eq '(' || $tokens->[0] =~ /$placeholder_re/x
574 2502 11445 0 ref $op || defined $args
581 177 26 1581 $op eq 'AND' or $op eq 'OR'
203 705 876 $op eq 'AND' or $op eq 'OR' or $op =~ /$binary_op_re/
655 30305 42861 6227 not ref $child && @$child or $child->[0] ne '-PAREN'
682 90 41 4 $parent_op eq 'AND' || $parent_op eq 'OR'
1476 85 3081 $single_child_op eq '-LITERAL' || $single_child_op eq '-PLACEHOLDER'
3 2 1556 $parent_op eq 'AND' || $parent_op eq 'OR' || $parent_op eq 'NOT'
1834 158 2645 $parent_op eq 'AND' || $parent_op eq 'OR'
8 1 0 $single_grandchild_op eq '-PAREN' || $single_grandchild_op eq '-LITERAL' || $single_grandchild_op eq '-PLACEHOLDER'
793 0 47971 139 ref $ast ne 'ARRAY' or $ast->[0] ne 'ORDER BY'