Branch Coverage

blib/lib/SQL/Yapp.pm
Criterion Covered Total %
branch 710 1108 64.0


line true false branch
323 20 0 if scalar @_
335 1 0 if ($get_dbh) { }
375 0 0 if ($s eq 'all') { }
381 0 0 unless $dialect{$s}
390 0 0 if (not ref $s) { }
0 0 elsif (ref $s eq 'ARRAY') { }
406 0 9 unless $dialect{$s}
619 5 0 $read_dialect{'mysql'} ? :
5 0 $read_dialect{'postgresql'} ? :
5 0 $read_dialect{'oracle'} ? :
685 1 0 if length $s <= 400
1137 361 2824 unless defined $s
1138 0 2824 $s =~ /[\x00-\x1f\x7f\']/ ? :
1147 427 5788 if ($$s =~ /\G\n/cg)
1151 2252 3536 if $$s =~ /\G[^\n\S]+/cg
1152 19 3517 if $$s =~ /\G\#[^\n]*/cg
1160 0 3182 unless $kind
1185 1 2 if (defined $t->{$key})
1190 1 1 if ($t->{$key})
1195 1 0 if (scalar keys %opt) { }
1243 0 62 if $@
1257 0 170 if $@
1270 0 50 if $@
1291 666 71 if ($reserved{$name}) { }
1314 172 737 if (my $tree = $multi_token{$name}) { }
1319 140 187 unless $$s =~ /\G ([A-Z][A-Z_0-9]*)\b /cgsx
1324 32 155 unless ($tree)
1353 909 2281 if $$s =~ /\G ([A-Z][A-Z_0-9]*)\b /cgsx
1354 529 1752 if $$s =~ /\G ([a-z][a-z_0-9]*)\b /cgsx
1355 0 1752 if $$s =~ /\G \`([^\n\\\`]+)\` /cgsx
1357 8 1744 if ($$s =~ /\G ([A-Z][a-z][A-Za-z0-9]*)\b /cgsx)
1360 0 8 unless &good_interpol_type($interpol_new)
1363 0 8 if $interpol
1367 0 8 if $tok->{'error'}
1371 0 8 unless $tok->{'kind'} =~ /^interpol/
1376 0 1744 if $$s =~ /\G ([A-Za-z_][A-Za-z_0-9]*) /cgsx
1387 1 1743 if $$s =~ /\G 0x([0-9a-f_]+)\b /cgisx
1388 1 1742 if $$s =~ /\G (0b[0-1_]+)\b /cgsx
1389 216 1526 if $$s =~ /\G ([1-9][0-9_]*)\b /cgsx
1390 17 1509 if $$s =~ /\G ([0][0-7_]*)\b /cgsx
1393 0 1509 if $$s =~ /\G ([1-9][0-9_]*)(?=[KMG]\b) /cgsx
1397 0 1509 if $$s =~ /\G( (?= [1-9] # not empty, but numeric | [.][0-9] ) (?: [1-9] [0-9_]* )? (?: [.] [0-9_]+ )? (?: e[-+] [0-9_]+ )?\b )/cgisx
1405 0 1509 if $$s =~ /\G ([0-9][a-z_0-9]*) /cgisx
1409 71 1438 if $$s =~ /\G (?= \$\S ) /cgsx
1410 71 1367 if $$s =~ /\G (?= \@\S ) /cgsx
1411 28 1339 if $$s =~ /\G (?= \%[^\s\d] ) /cgsx
1412 62 1277 if $$s =~ /\G (?= \{ ) /cgsx
1413 50 1227 if $$s =~ /\G (?= [\'\"] ) /cgsx
1416 1186 41 if $$s =~ m(\G( == | != | <= | >= | \&\& | \|\| | \! | \^\^ | \*\* | \^ | [-+*/;:,.()\[\]{}<=>?\%\&\|] ))cgsx
1425 1 40 if $$s =~ /\G(.)/cgs
1469 10897 874 unless ref $x
1472 874 0 if ref $x eq 'ARRAY'
1475 0 0 if ref $x eq 'HASH'
1491 1108 8106 unless $kind
1495 1416 6690 if $kind{$lx->{'token'}{'kind'}}
1505 1416 7798 if (my $x = &looking_at_raw($lx, $kind))
1506 1324 92 if $do_shift
1515 1 0 if ref $_[0] eq 'CODE'
1520 1 0 if $map
1523 0 1 if scalar @l == 0
1524 1 0 if scalar @l == 1
1525 0 0 if scalar @l == 2
1533 778 1 if (my $x = &looking_at($lx, $kind, $do_shift)) { }
0 1 elsif (my $err = &lx_token_error($lx)) { }
1584 244 2333 ref $kind ? :
1623 0 1484 if $pos{$p}++
1626 9 1475 if &looking_at($lx, $end)
1627 1 1474 if &looking_at($lx, '')
1634 2 1463 unless my(@result1) = &$parse_elem($lx)
1659 0 154 if $lx->{'error'}
1671 7487 2048 if (exists $hash->{$key}) { }
1086 962 elsif (exists $$hash{-'default'}) { }
1683 0 392 unless exists $hash->{$result}
1693 8243 0 if (my $code = &find_ref(\%case, $value))
1703 1 1 if ($lx->{'token'}{'error'})
1716 1 0 if (my $err = &lx_token_error($lx)) { }
0 0 elsif (scalar keys %opt > 10) { }
1752 0 49 if ($r->{'type'} eq 'num')
1822 0 324 unless &parse_ident_chain($lx, $arr)
1824 0 324 if scalar @$arr < 1
1825 0 324 if (scalar @$arr > 4)
1846 0 186 unless &parse_ident_chain($lx, $arr)
1848 0 186 if scalar @$arr < 1
1849 0 186 if (scalar @$arr > 3)
1941 0 49 if $lx->{'error'}
1953 0 2 unless $r->{'name'} = &parse_column_name($lx)
1955 1 1 if (&looking_at($lx, '(', 1))
1957 0 1 unless $r->{'length'} = &parse_limit_expr($lx) and &expect($lx, ')', 1)
1961 1 1 if (&looking_at($lx, 'DESC', 1)) { }
0 1 elsif (&looking_at($lx, 'ASC', 1)) { }
1991 0 3 if $lx->{'error'}
2003 0 122 unless $r->{'table'} = &parse_table($lx)
2005 3 119 if (&looking_at($lx, 'AS', 1))
2007 0 3 unless $r->{'as'} = &parse_table_name($lx)
2021 9 164 if (&looking_at($lx, '.')) { }
2043 0 0 defined $sg ? :
0 0 defined $pl ? :
0 0 $cnt == 1 ? :
2050 0 24 unless my $limit = &parse_limit_num($lx)
2071 0 57 unless &expect($lx, '(', 1) and my $list = &parse_list([], $lx, $func, ',', ')') and &expect($lx, ')', 1)
2085 27 46 if (my $spec = &find_ref(\%type_spec, $lx->{'token'}{'kind'}))
2086 1 26 if ($spec->{'value_list'}) { }
2090 0 1 unless my $value_list = &parse_list_delim($lx, \&SQL::Yapp::parse_expr)
2139 0 4 unless my $arg = &parse_charset($lx)
2152 0 1 unless my $arg = &parse_collate($lx)
2178 0 23 unless my $list = &parse_list([], $lx, \&SQL::Yapp::parse_limit_expr, ',', ')')
2184 0 1 if (scalar @$list > 1)
2194 0 1 if (&looking_at($lx, ')')) { }
2199 0 1 unless my $unit = &parse_char_unit($lx)
2206 0 0 if (scalar @$list > 1)
2217 0 22 if (scalar @$list > 2)
2226 0 23 if $lx->{'error'}
2227 0 23 unless &expect($lx, ')', 1)
2243 0 86 if $lx->{'error'}
2246 30 56 unless defined $r->{'functor'}
2256 8 22 if (&looking_at($lx, ['interpol', 'interpolType'])) { }
2262 0 22 unless ($type_spec{$lx->{'token'}{'kind'}})
2278 0 1 unless my $arg = &parse_list([], $lx, \&SQL::Yapp::parse_type, ',', ')')
2294 0 1 unless my $r = &parse_type_list($lx) and &expect($lx, ')', 1)
2324 0 3 unless $r->{'table'} = &parse_table($lx) and $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name)
2326 1 2 if (&looking_at($lx, 'MATCH', 1))
2335 0 1 unless $r->{'on_delete'} = &parse_on_action($lx)
2340 0 0 unless $r->{'on_update'} = &parse_on_action($lx)
2345 0 3 if $lx->{'error'}
2358 2 36 if (&looking_at($lx, 'CONSTRAINT', 1))
2360 0 2 unless $constraint = &parse_constraint($lx)
2365 0 20 if ($constraint) { }
2370 4 16 if ($func)
2429 0 6 unless my $val = &parse_expr($lx)
2442 0 0 unless my $val = &parse_expr($lx)
2457 0 0 unless my $val = &parse_expr($lx)
2484 0 1 unless my $ref = &parse_references($lx)
2493 38 0 $read_dialect{'mysql'} ? :
2509 0 38 if $lx->{'error'}
2512 16 22 unless defined $r->{'functor'}
2534 0 9 unless $r->{'datatype'} = &parse_type($lx)
2537 0 16 if $lx->{'error'}
2547 3 6 if (&looking_at($lx, [@SELECT_INITIAL, 'interpolStmt'])) { }
2549 0 3 unless my $q = &parse_select_stmt($lx)
2560 0 6 unless my $arg = &parse_list([], $lx, \&SQL::Yapp::parse_expr, ',', ')')
2576 0 9 unless my $r = &parse_expr_list($lx) and &expect($lx, ')', 1)
2623 14 20 if (not ref $e) { }
13 7 elsif (ref $e eq 'SCALAR') { }
7 0 elsif (ref $e eq 'ARRAY') { }
2625 0 14 unless &expect($lx, $e, 1)
2630 0 13 unless my $arg = &parse_thing($lx, $$e)
2634 2 5 if (&looking_at($lx, $e->[0]))
2636 0 2 unless &parse_funcsep($lx, $r, $e)
2652 0 9 unless $cond
2663 22 20 unless &looking_at($lx, 'WHEN', 1)
2668 9 11 if ($functor and $functor->{'allow_when'}) { }
2676 0 20 unless $cond and &expect($lx, 'THEN', 1) and my $expr = &parse_expr($lx)
2690 0 10 unless &looking_at($lx, 'WHEN', 1) and my $cond = &parse_expr($lx) and &expect($lx, 'THEN', 1) and my $expr = &parse_expr($lx)
2706 1 182 if ($right_mark || '') eq 'string' and $right->{'value'} eq 'IN'
2709 178 4 unless $left
2715 1 3 if $left->{'value'} eq $right->{'value'} and $left->{'read_type'} eq 'infix()'
2718 0 3 if ($do_prec) { }
2720 0 0 if ($left->{'prec'} and $right->{'prec'})
2722 0 0 if $left->{'prec'} > $right->{'prec'}
2725 0 0 if $left->{'prec'} < $right->{'prec'}
2728 0 0 if ($left->{'assoc'} and $right->{'assoc'} and $left->{'assoc'} == $right->{'assoc'})
2731 0 0 if ($left->{'assoc'} == -1 and $right_mark) { }
2743 3 0 if (defined $left->{'value2'})
2756 0 183 unless ($result)
2768 849 262 unless my $functor = &find_ref(\%$map, $kind)
2770 3 259 if (my $accept = $functor->{'accept'})
2772 3 0 if ($read_dialect{$a})
2785 0 257 if $r->{'arg'}
2800 183 829 if (my $right = &find_functor(\%functor_suffix, $kind))
2802 0 183 unless my $action = &shift_or_reduce($lx, $left, $right, $right_mark)
2804 178 5 if ($action == 1)
2814 1 90 unless my $arg2 = &parse_thing($lx, scalar &get_rhs($right, 0), $right, 1)
2822 0 64 unless my $argi = &parse_thing($lx, scalar &get_rhs($right, $i++), $right, 1)
2829 0 2 unless my $arg2 = &parse_thing($lx, scalar &get_rhs($right, 0), $right, 1)
2833 0 2 if (&looking_at($lx, $right->{'value2'}, 1))
2835 0 0 unless my $arg3 = &parse_thing($lx, scalar &get_rhs($right, 1), $right, 1)
2843 0 2 unless my $arg2 = &parse_thing($lx, scalar &get_rhs($right, 0), $right, 1) and &expect($lx, $right->{'value2'}, 1) and my $arg3 = &parse_thing($lx, scalar &get_rhs($right, 1), $right, 1)
2852 1 177 if $lx->{'error'}
2912 1 6 if (&looking_at($lx, '(', 1) and my $functor = &find_functor(\%functor_special, $r->{'token'}{'kind'}))
2918 0 1 unless my $arg = &parse_column_name($lx) and &expect($lx, ')', 1)
2929 12 22 if (&looking_at($lx, ['WHEN', 'ELSE', 'END'])) { }
2931 0 12 unless $r->{'arg'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_when)
2936 0 22 unless $r->{'switchval'} = &parse_expr($lx) and $r->{'arg'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_when_post)
2939 24 10 if (&looking_at($lx, 'ELSE', 1))
2941 0 24 unless $r->{'otherwise'} = &parse_expr($lx)
2945 0 34 unless &expect($lx, 'END', 1)
2951 0 1 unless ($functor and $functor->{'comparison'} and $right_mark)
2956 0 1 unless ($functor2)
2963 0 1 unless &expect($lx, '(', 1) and my $q = &parse_select_stmt($lx) and &expect($lx, ')', 1)
2976 2 11 if (&looking_at($lx, [@SELECT_INITIAL, 'interpolStmt'])) { }
2978 0 2 unless my $q = &parse_select_stmt($lx)
2984 0 11 unless my $arg = &parse_expr($lx)
2989 0 13 unless &expect($lx, ')', 1)
2994 9 68 if (not $functor2 and $lx->{'token'}{'type'} eq 'keyword')
2999 77 0 if ($functor2) { }
0 0 elsif (not $lx->{'error'}) { }
3006 16 29 if (&looking_at($lx, '(', 0)) { }
3008 0 16 unless $r->{'arg'} = &parse_list_delim($lx, \&SQL::Yapp::parse_expr)
3012 0 29 unless my $arg = &parse_thing($lx, scalar &get_rhs($functor2, 0), $functor2, 0)
3018 0 25 unless $r->{'arg'} = &parse_list_delim($lx, \&SQL::Yapp::parse_expr)
3022 0 1 unless &expect($lx, '(', 1) and my $arg1 = &parse_column_name($lx) and &expect($lx, ')', 1)
3030 0 6 unless &expect($lx, '(', 1) and &parse_funcsep($lx, $r, $functor2->{'rhs'})
3033 0 77 if $lx->{'error'}
3043 0 817 if $lx->{'error'}
3045 0 817 unless $r
3073 1 225 unless $r->{'expr'} = &parse_expr($lx)
3075 4 221 if (&looking_at($lx, 'AS', 1))
3077 0 4 unless $r->{'as'} = &parse_column_name($lx)
3094 0 14 unless $r->{'expr'} = &parse_expr($lx)
3099 3 18 if ($lx->{'token'}{'type'} eq 'string') { }
3105 0 3 unless $r->{'expr'} = &parse_expr($lx)
3114 0 35 if $lx->{'error'}
3144 3 119 if (&looking_at($lx, 'NATURAL', 1))
3163 0 2 if ($r->{'natural'})
3181 0 122 if $lx->{'error'}
3183 112 10 unless (&looking_at($lx, 'JOIN', 1))
3184 0 112 if ($shifted)
3192 0 10 unless $r->{'table'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',')
3194 5 5 if ($want_condition)
3203 0 2 unless $r->{'using'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name)
3209 0 127 if $lx->{'error'}
3210 112 15 unless $r
3219 5 483 if (my $x = &looking_at($lx, $words, 1))
3260 0 180 unless &expect($lx, 'SELECT', 1)
3280 180 0 $read_dialect{'mysql'} ? :
3288 180 0 $read_dialect{'mysql'} ? :
3297 1 179 unless $r->{'expr_list'} = &parse_list([], $lx, \&SQL::Yapp::parse_expr_as, ',')
3299 94 85 if (&looking_at($lx, 'FROM', 1))
3302 0 94 unless $r->{'from'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',') and $r->{'join'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_join)
3304 44 50 if (&looking_at($lx, 'WHERE', 1))
3306 0 44 unless $r->{'where'} = &parse_where($lx)
3308 6 88 if (&looking_at($lx, 'GROUP BY', 1))
3310 0 6 unless $r->{'group_by'} = &parse_list([], $lx, \&SQL::Yapp::parse_order, ',')
3314 1 93 if (&looking_at($lx, 'HAVING', 1))
3316 0 1 unless $r->{'having'} = &parse_expr($lx)
3318 8 86 if (&looking_at($lx, 'ORDER BY', 1))
3320 0 8 unless $r->{'order_by'} = &parse_list([], $lx, \&SQL::Yapp::parse_order, ',')
3323 4 90 if (&looking_at($lx, 'LIMIT', 1))
3324 4 0 unless (&looking_at($lx, 'ALL', 1))
3326 2 2 if (&looking_at($lx, ',', 1)) { }
3335 1 93 if (not $r->{'limit_offset'} and &looking_at($lx, 'OFFSET', 1))
3355 94 0 $read_dialect{'mysql'} || $read_dialect{'postgresql'} ? :
94 0 $read_dialect{'mysql'} ? :
94 0 $read_dialect{'postgresql'} ? :
3384 0 13 unless &expect($lx, 'INSERT', 1)
3393 13 0 $read_dialect{'mysql'} ? :
3405 0 13 unless $r->{'into'} = &parse_table($lx)
3407 5 8 if (&looking_at($lx, '('))
3409 0 5 unless $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name)
3427 0 8 if ($r->{'column'})
3441 0 13 if $lx->{'error'}
3443 1 12 if ($read_dialect{'mysql'} and &looking_at($lx, 'ON DUPLICATE KEY UPDATE', 1))
3447 0 1 unless $r->{'duplicate_update'} = &parse_list([], $lx, \&SQL::Yapp::parse_expr, ',')
3471 0 9 unless &expect($lx, 'UPDATE', 1)
3487 9 0 $read_dialect{'mysql'} ? :
9 0 $read_dialect{'postgresql'} ? :
3496 0 9 unless $r->{'table'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',') and &expect($lx, 'SET', 1) and $r->{'set'} = &parse_list([], $lx, \&SQL::Yapp::parse_expr, ',')
3498 1 8 if (&looking_at($lx, 'FROM', 1))
3500 0 1 unless $r->{'from'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',')
3503 0 9 unless $r->{'join'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_join)
3505 9 0 if (&looking_at($lx, 'WHERE', 1))
3507 0 9 unless $r->{'where'} = &parse_where($lx)
3509 1 8 if (&looking_at($lx, 'ORDER BY', 1))
3511 0 1 unless $r->{'order_by'} = &parse_list([], $lx, \&SQL::Yapp::parse_order, ',')
3513 1 8 if (&looking_at($lx, 'LIMIT', 1))
3538 0 4 unless &expect($lx, 'DELETE', 1)
3547 4 0 $read_dialect{'mysql'} ? :
3555 0 4 unless &expect($lx, 'FROM', 1)
3560 4 0 $read_dialect{'postgresql'} ? :
3566 0 4 unless $r->{'from'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',')
3568 2 2 if (&looking_at($lx, 'USING', 1))
3570 0 2 unless $r->{'using'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',')
3574 0 4 unless $r->{'join'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_join)
3576 3 1 if (&looking_at($lx, 'WHERE', 1))
3578 0 3 unless $r->{'where'} = &parse_where($lx)
3580 0 4 if (&looking_at($lx, 'ORDER BY', 1))
3582 0 0 unless $r->{'order_by'} = &parse_list([], $lx, \&SQL::Yapp::parse_order, ',')
3584 0 4 if (&looking_at($lx, 'LIMIT', 1))
3596 0 1 unless $keyword
3598 0 1 if ref $keyword
3627 1 0 unless $r
3628 0 0 if $lx->{'error'}
3637 1 2 if (&looking_at($lx, 'USING', 1))
3649 3 0 if (&looking_at($lx, 'CONSTRAINT', 1))
3651 0 3 unless $r->{'constraint'} = &parse_constraint($lx)
3661 0 0 unless $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_index) and $r->{'index_option'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_index_option)
3669 0 1 unless $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_index) and $r->{'index_option'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_index_option)
3677 0 0 unless $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_index) and $r->{'index_option'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_index_option)
3685 0 0 unless $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_index) and $r->{'index_option'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_index_option)
3693 0 2 unless $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name) and $r->{'reference'} = &parse_references($lx)
3704 0 0 unless $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_index)
3708 3 0 $read_dialect{'mysql'} ? :
3711 0 3 if $lx->{'error'}
3725 0 6 unless $r->{'value'} = &$parse($lx)
3740 1 0 $read_dialect{'postgresql'} ? :
3799 12 0 $read_dialect{'mysql'} ? :
3800 4 8 unless $r
3801 0 8 if $lx->{'error'}
3812 0 6 unless $r->{'name'} = &parse_column_name($lx) and $r->{'column_spec'} = &parse_column_spec($lx)
3835 0 2 unless &expect($lx, \@CREATE_TABLE_INITIAL)
3841 1 1 if ($read_dialect{'mysql'} and &looking_at($lx, 'IF NOT EXISTS', 1))
3848 0 2 unless $r->{'table'} = &parse_table($lx)
3852 2 0 if (&looking_at($lx, '('))
3854 0 2 unless my $spec = &parse_list_delim($lx, \&SQL::Yapp::parse_column_def_or_option)
3861 0 2 unless $r->{'tableopt'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_table_option)
3863 1 1 if (&looking_at($lx, 'AS', 1) or &looking_at($lx, \@SELECT_INITIAL))
3867 0 1 unless $r->{'select'} = &parse_select($lx)
3870 0 0 unless (scalar @{$r->{'column_def'};} or $r->{'select'})
3883 0 1 unless &expect($lx, \@DROP_TABLE_INITIAL)
3889 1 0 if ($read_dialect{'mysql'} and &looking_at($lx, 'IF EXISTS', 1))
3896 0 1 unless $r->{'table'} = &parse_list([], $lx, \&SQL::Yapp::parse_table, ',')
3925 0 20 unless &expect($lx, \@ALTER_TABLE_INITIAL)
3933 0 20 unless $r->{'table'} = &parse_table($lx)
3941 0 1 unless my $constraint = &parse_constraint($lx)
3948 0 3 unless my $column = &parse_column_name($lx)
3956 0 1 unless my $column = &parse_column_name($lx) and &expect($lx, 'TO', 1) and my $column2 = &parse_column_name($lx)
3970 0 6 if $lx->{'error'}
3989 0 2 if $lx->{'error'}
3990 1 1 if (my $x = &looking_at($lx, 'USING', 1))
3995 6 0 $read_dialect{'postgresql'} ? :
4007 1 1 if (&looking_at($lx, '(', 1)) { }
4009 0 1 if $lx->{'error'}
4014 0 1 unless my $col1 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4030 0 1 unless my $col1 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4037 0 1 unless my $col1 = &parse_column_name($lx) and my $col2 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4045 0 1 unless my $constraint = &parse_constraint($lx)
4051 0 1 unless my $index = &parse_index($lx)
4055 20 0 $read_dialect{'mysql'} ? :
4058 0 20 if $lx->{'error'}
4070 0 3 if ($lx->{'token'}{'type'} eq 'num' or $lx->{'token'}{'type'} eq 'string')
4077 0 3 unless ($lx->{'token'}{'type'})
4082 0 3 if ($lx->{'token'}{'perltype'} eq 'hash')
4236 0 2834 unless defined $n
4243 3792 3596 if ($s->{'need_comma'})
4252 4347 0 if ($perl ne '')
4275 94 670 if ($opt{'joinfunc'}) { }
254 416 elsif ($opt{'prefix'} eq '' and $opt{'suffix'} eq '' and $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq '') { }
21 395 elsif ($opt{'sep'} eq '' and $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq $opt{'prefix'} . $opt{'suffix'}) { }
4304 21 0 if ($opt{'prefix'} ne '')
4346 277 246 if ($in_list) { }
4359 277 246 if ($in_list)
4381 18 1432 if (defined $end_str)
4391 0 275 if $s->{'buff'} eq ''
4407 354 0 if (scalar @$list)
4417 2 352 defined $opt{'sep'} ? :
4420 1 353 if (my $x = $opt{'map'})
4444 0 1056 if $allow and scalar grep({$token->{'kind'} eq $_;} &flatten($allow)) == 0
4456 515 0 if ($token->{'kind'} =~ /^interpol/) { }
4471 9 34 if ($token->{'perltype'} eq 'hash') { }
4496 3 858 if $token->{'perltype'} eq 'array' or $token->{'perltype'} eq 'hash'
4504 358 116 if (not $in_list or $thing->{'token'}{'perltype'} eq 'scalar') { }
19 97 elsif ($thing->{'token'}{'perltype'} eq 'hash') { }
4511 16 3 if ($opt{'hash'}) { }
3 0 elsif ($opt{'hashkeys'}) { }
4539 90 75 if ($thing->{'type'} eq 'column')
4581 470 39 if (not $in_list or scalar @non_scalar_i == 0) { }
35 4 elsif (scalar @non_scalar_i == 1) { }
4597 5 35 $token[$_]{'perltype'} eq 'scalar' ? :
4611 0 8 $_->{'perltype'} eq 'scalar' ? :
4616 0 8 $token[$_]{'perltype'} eq 'scalar' ? :
4632 5 101 if (defined $limit_cnt or defined $limit_offset)
4634 5 0 if ($limit_cnt)
4639 3 2 if ($limit_offset)
4650 0 18 if ($in_list) { }
4666 3 0 if (my $x = $thing->{'constraint'})
4671 1 2 if (my $x = $thing->{'index_type'})
4678 2 1 if (my $x = $thing->{'reference'})
4711 16 2804 unless (defined $thing)
4715 380 2424 unless (ref $thing)
4719 1 2423 if (ref $thing eq 'ARRAY')
4733 165 13 if (scalar @{$thing->{'expr_list'};} == 1)
4734 149 16 unless (&is_multicol($thing->{'expr_list'}[0]))
4749 94 82 if (my $x = $thing->{'from'})
4752 94 0 if (my $x = $thing->{'join'})
4753 4 90 if (@$x)
4761 44 50 if (my $x = $thing->{'where'})
4766 6 87 if (my $x = $thing->{'group_by'})
4768 1 5 if ($thing->{'group_by_with_rollup'})
4777 1 92 if (my $x = $thing->{'having'})
4782 8 85 if (my $x = $thing->{'order_by'})
4810 2 2 if (my $x = $thing->{'using'})
4817 4 0 if (my $x = $thing->{'join'})
4818 2 2 if (@$x)
4826 3 1 if (my $x = $thing->{'where'})
4831 0 4 if (my $x = $thing->{'order_by'})
4856 5 8 if (my $col = $thing->{'column'})
4860 5 8 if (my $val = $thing->{'value'}) { }
8 0 elsif (my $set = $thing->{'set'}) { }
0 0 elsif (my $sel = $thing->{'select'}) { }
0 0 elsif ($thing->{'default_values'}) { }
4882 1 12 if (my $x = $thing->{'duplicate_update'})
4900 1 8 if (my $x = $thing->{'from'})
4906 9 0 if (my $x = $thing->{'join'})
4907 0 9 if (@$x)
4915 9 0 if (my $x = $thing->{'set'})
4921 9 0 if (my $x = $thing->{'where'})
4926 1 8 if (my $x = $thing->{'order_by'})
4942 1 1 if ($thing->{'if_not_exists'})
4963 1 1 if (my $x = $thing->{'select'})
4976 1 0 if ($thing->{'if_exists'})
4981 1 0 if (my $x = $thing->{'cascade'})
4992 0 20 if ($thing->{'only'})
5031 5 10 if ($thing->{'type'} eq 'interpol') { }
5037 3 7 if ($thing->{'natural'}) { }
5038 3 0 if ($thing->{'type'} eq 'INNER') { }
5051 3 7 if (my $on = $thing->{'on'}) { }
2 5 elsif (my $using = $thing->{'using'}) { }
5078 3 119 if (my $x = $thing->{'as'}) { }
5083 0 3 if ($write_dialect eq 'oracle') { }
5099 4 220 if (my $x = $thing->{'as'}) { }
5112 5 13 if ($thing->{'desc'}) { }
5120 5 12 if ($thing->{'desc'}) { }
5154 0 56 if $parens
5185 0 22 if $parens
5244 1 2 $thing->{'match'} ? :
1 2 $thing->{'on_delete'} ? :
0 3 $thing->{'on_update'} ? :
5291 292 74 $thing->{'token'}{'type'} eq 'num' || $thing->{'token'}{'type'} eq 'string' || !$parens ? :
9 366 $thing->{'maybe_check'} ? :
5310 0 2 if $parens
5312 0 2 unless scalar @{$thing->{'arg'};} == 1
5323 0 1 unless scalar @{$thing->{'arg'};} == 1
5325 0 1 if ($in_list) { }
5340 4 85 if $parens
5354 1 4 if $parens
5362 2 2 if (scalar @{$thing->{'arg'};} == 3)
5376 20 43 if ($thing->{'type'} eq 'prefix()')
5380 0 63 unless my $fk = $functor_kind{$f->{'type'} or ''}
5382 27 36 if ($in_list) { }
5384 17 10 $parens ? :
5393 8 28 $parens ? :
5408 0 95 unless my $fk = $functor_kind{$f->{'type'} or ''}
5413 11 84 $parens ? :
5437 13 34 if $parens
5441 22 12 if ($sw) { }
5449 24 10 if (my $e = $thing->{'otherwise'}) { }
5457 30 0 if (ref $wh eq 'ARRAY') { }
5484 2 0 if (defined $thing->{'length'} or $thing->{'desc'}) { }
5487 1 1 if (defined $thing->{'length'})
5492 1 1 if ($thing->{'desc'})
5537 280 279 if (scalar @_)
5539 1 279 unless (defined $check_val)
5545 2 557 if ($lx->{'error'})
5669 0 22 unless $func
5670 0 22 if &looking_at($lx, '')
5697 0 258 unless ($func)
5711 0 258 unless defined $end and $start < $end
5720 0 258 if $debug
5731 0 258 if $line_cnt_new > $line_cnt_old
5734 101 157 if (my $line_cnt_less = $line_cnt_old - $line_cnt_new)
5821 159 731 if &blessed($x) and $x->isa('SQL::Yapp::Obj1')
5935 0 0 unless $aref
5954 0 0 unless $sth->execute
5957 0 0 unless scalar @$a == 1
6139 9 9 if (ref $_[1] eq $_[0]) { }
7 2 elsif (ref $_[1]) { }
6188 14 0 if ($self->op eq '=')
6207 7 0 if &blessed($x) and $x->isa('SQL::Yapp::Obj')
6265 1 2 unless ($spec->{$o})
6277 0 13 unless $self->{'spec'}{$key}
6319 18 20 unless $self->{'base'}
6321 19 1 if ($self->{'spec'}{'prec1'} and defined $self->{'option'}{'prec1'})
6324 0 19 if ($self->{'spec'}{'prec2'} and defined $self->{'option'}{'prec2'}) { }
6328 0 0 if ($self->{'spec'}{'prec_mul'} and $self->{'option'}{'prec_mul'})
6331 0 0 if ($self->{'spec'}{'prec_unit'} and $self->{'option'}{'prec_unit'})
6337 0 20 if (my $value_list = $self->{'spec'}{'value_list'} && $self->{'option'}{'value_list'})
6340 3 17 if (my $x = $self->{'spec'}{'charset'} && $self->{'option'}{'charset'})
6343 0 20 if (my $x = $self->{'spec'}{'collate'} && $self->{'option'}{'collate'})
6347 0 60 if (my $x = $self->{'spec'}{$key} && $self->{'option'}{$key})
6400 0 6 if (my $x = $self->{'name'}{$key})
6412 4 16 if (my $x = $self->{'option'}{$key})
6418 2 10 if (my $x = $self->{'option'}{$key})
6424 0 4 if (my $x = $self->{'option'}{$key})
6430 0 4 if (my $x = $self->{'option'}{$key})
6480 97 9 if (my $dialect = $functor->{'dialect'})
6481 28 69 if (my $f2 = &find_ref(\%$dialect, $write_dialect))
6499 6 0 defined $functor->{'result0'} ? :
46 6 scalar @arg ? :
6507 1 25 unless scalar @arg == 1
6513 0 7 unless scalar @arg == 1
6517 35 70 $parens ? :
6535 1 218 unless (defined wantarray)
6536 0 1 if scalar @_ == 0
6541 27 191 if wantarray
6544 1 190 if scalar @_ > 1
6551 0 0 if scalar @_ == 0
6558 0 0 if scalar @_ == 1
6565 1 212 if (scalar @_ == 5)
6566 1 0 if defined $_[1]
6576 14 0 if (ref $x) { }
6586 0 7 if scalar @_ == 0
6598 0 7 unless ref $x eq 'ARRAY'
6600 0 7 unless scalar @$x >= 1
6611 7 0 if (ref $x) { }
6624 0 11 unless my $spec = &find_ref(\%type_spec, $base)
6626 0 11 unless $self
6634 0 0 unless my $spec = &find_ref(\%type_spec, $base)
6636 0 0 unless $self
6647 0 11 if defined $prec2
6656 0 0 if defined $mul
6657 0 0 if defined $unit
6675 2 0 if (ref $x) { }
6738 0 1 if (ref $x) { }
1 0 elsif (defined $x) { }
6753 122 0 if (defined $x) { }
6765 1 1 if (ref $x)
6766 0 1 if (ref $y)
6767 0 1 unless defined $y
6770 1 0 defined $x ? :
6780 0 3 if (ref $x)
6781 0 3 if (ref $y)
6782 0 3 if (ref $z)
6783 0 3 unless defined $z
6786 3 0 defined $x ? :
3 0 defined $y ? :
6798 5 119 ref $x ? :
6818 0 0 ref $x ? :
6838 0 2 ref $x ? :
6858 0 0 ref $x ? :
6878 0 0 ref $x ? :
6898 0 0 ref $x ? :
6918 0 0 ref $x ? :
6938 0 1 ref $x ? :
6958 0 10 if (ref $x) { }
10 0 elsif (defined $x) { }
6972 4 205 if (ref $x) { }
205 0 elsif (defined $x) { }
6986 1 24 if (ref $x) { }
24 0 elsif (defined $x) { }
7061 3 0 if (ref $x) { }
7082 5 65 if (ref $x) { }
7083 0 5 if ref $x eq 'HASH'
7084 0 5 if ref $x eq 'ARRAY'
7085 0 5 if ref $x eq 'CODE'
7086 0 5 if ref $x eq 'SCALAR'
7097 21 132 if (ref $x) { }
7098 0 21 unless &blessed($x)
7112 3 2 if (ref $x) { }
7126 3 3 &blessed($e) && $e->isa('SQL::Yapp::Check') ? :
7140 0 7 &blessed($e) && $e->isa('SQL::Yapp::Check') ? :
7154 4 5 if (ref $x) { }
5 0 elsif (defined $x) { }
7168 6 4 if (ref $x) { }
4 0 elsif (defined $x) { }
7185 2 0 if (ref $x) { }
7199 4 0 if (ref $x) { }
7213 0 14 if (ref $x) { }
14 0 elsif (&looks_like_number($x)) { }
7230 1 1 if (defined $cnt) { }
7231 1 0 if (defined $offset) { }
7239 1 0 if (defined $offset) { }
7240 0 1 if ($write_dialect eq 'postgresql') { }
7265 2 6 if (scalar @_ == 2)
7282 0 0 if (scalar @_ == 1)