Condition Coverage

blib/lib/SQL/Yapp.pm
Criterion Covered Total %
condition 146 293 49.8


and 3 conditions

line !l l&&!r l&&r condition
1957 0 0 1 $r->{'length'} = &parse_limit_expr($lx) and &expect($lx, ')', 1)
2071 0 0 57 &expect($lx, '(', 1) and my $list = &parse_list([], $lx, $func, ',', ')')
0 0 57 &expect($lx, '(', 1) and my $list = &parse_list([], $lx, $func, ',', ')') and &expect($lx, ')', 1)
2294 0 0 1 my $r = &parse_type_list($lx) and &expect($lx, ')', 1)
2324 0 0 3 $r->{'table'} = &parse_table($lx) and $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name)
2576 0 0 9 my $r = &parse_expr_list($lx) and &expect($lx, ')', 1)
2668 11 9 0 $functor and $functor->{'allow_when'}
2676 0 0 20 $cond and &expect($lx, 'THEN', 1)
0 0 20 $cond and &expect($lx, 'THEN', 1) and my $expr = &parse_expr($lx)
2690 12 0 10 &looking_at($lx, 'WHEN', 1) and my $cond = &parse_expr($lx)
12 0 10 &looking_at($lx, 'WHEN', 1) and my $cond = &parse_expr($lx) and &expect($lx, 'THEN', 1)
0 0 10 &looking_at($lx, 'WHEN', 1) and my $cond = &parse_expr($lx) and &expect($lx, 'THEN', 1) and my $expr = &parse_expr($lx)
2706 182 0 1 ($right_mark || '') eq 'string' and $right->{'value'} eq 'IN'
2715 3 0 1 $left->{'value'} eq $right->{'value'} and $left->{'read_type'} eq 'infix()'
2720 0 0 0 $left->{'prec'} and $right->{'prec'}
2728 0 0 0 $left->{'assoc'} and $right->{'assoc'}
0 0 0 $left->{'assoc'} and $right->{'assoc'} and $left->{'assoc'} == $right->{'assoc'}
2731 0 0 0 $left->{'assoc'} == -1 and $right_mark
2843 0 0 2 my $arg2 = &parse_thing($lx, scalar &get_rhs($right, 0), $right, 1) and &expect($lx, $right->{'value2'}, 1)
0 0 2 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)
2912 6 0 1 &looking_at($lx, '(', 1) and my $functor = &find_functor(\%functor_special, $r->{'token'}{'kind'})
2918 0 0 1 my $arg = &parse_column_name($lx) and &expect($lx, ')', 1)
2936 0 0 22 $r->{'switchval'} = &parse_expr($lx) and $r->{'arg'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_when_post)
2951 0 1 0 $functor and $functor->{'comparison'}
0 1 0 $functor and $functor->{'comparison'} and $right_mark
2963 0 0 1 &expect($lx, '(', 1) and my $q = &parse_select_stmt($lx)
0 0 1 &expect($lx, '(', 1) and my $q = &parse_select_stmt($lx) and &expect($lx, ')', 1)
2994 68 0 9 not $functor2 and $lx->{'token'}{'type'} eq 'keyword'
3022 0 0 1 &expect($lx, '(', 1) and my $arg1 = &parse_column_name($lx)
0 0 1 &expect($lx, '(', 1) and my $arg1 = &parse_column_name($lx) and &expect($lx, ')', 1)
3030 0 0 6 &expect($lx, '(', 1) and &parse_funcsep($lx, $r, $functor2->{'rhs'})
3302 0 0 94 $r->{'from'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',') and $r->{'join'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_join)
3335 2 91 1 not $r->{'limit_offset'} and &looking_at($lx, 'OFFSET', 1)
3443 0 12 1 $read_dialect{'mysql'} and &looking_at($lx, 'ON DUPLICATE KEY UPDATE', 1)
3496 0 0 9 $r->{'table'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',') and &expect($lx, 'SET', 1)
0 0 9 $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, ',')
3661 0 0 0 $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 0 1 $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 0 $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 0 $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 0 2 $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name) and $r->{'reference'} = &parse_references($lx)
3812 0 0 6 $r->{'name'} = &parse_column_name($lx) and $r->{'column_spec'} = &parse_column_spec($lx)
3841 0 1 1 $read_dialect{'mysql'} and &looking_at($lx, 'IF NOT EXISTS', 1)
3889 0 0 1 $read_dialect{'mysql'} and &looking_at($lx, 'IF EXISTS', 1)
3956 0 0 1 my $column = &parse_column_name($lx) and &expect($lx, 'TO', 1)
0 0 1 my $column = &parse_column_name($lx) and &expect($lx, 'TO', 1) and my $column2 = &parse_column_name($lx)
4014 0 0 1 my $col1 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4030 0 0 1 my $col1 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4037 0 0 1 my $col1 = &parse_column_name($lx) and my $col2 = &parse_column_name($lx)
0 0 1 my $col1 = &parse_column_name($lx) and my $col2 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4275 380 0 290 $opt{'prefix'} eq '' and $opt{'suffix'} eq ''
380 290 0 $opt{'prefix'} eq '' and $opt{'suffix'} eq '' and $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq ''
394 22 0 $opt{'sep'} eq '' and $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq $opt{'prefix'} . $opt{'suffix'}
4444 1024 32 0 $allow and scalar grep({$token->{'kind'} eq $_;} &flatten($allow)) == 0
5711 0 0 258 defined $end and $start < $end
5821 731 0 159 &blessed($x) and $x->isa('SQL::Yapp::Obj1')
6207 0 0 7 &blessed($x) and $x->isa('SQL::Yapp::Obj')
6321 0 1 19 $self->{'spec'}{'prec1'} and defined $self->{'option'}{'prec1'}
6324 16 3 0 $self->{'spec'}{'prec2'} and defined $self->{'option'}{'prec2'}
6328 19 0 0 $self->{'spec'}{'prec_mul'} and $self->{'option'}{'prec_mul'}
6331 19 0 0 $self->{'spec'}{'prec_unit'} and $self->{'option'}{'prec_unit'}
6337 20 0 0 $self->{'spec'}{'value_list'} && $self->{'option'}{'value_list'}
6340 6 14 0 $self->{'spec'}{'charset'} && $self->{'option'}{'charset'}
6343 6 14 0 $self->{'spec'}{'collate'} && $self->{'option'}{'collate'}
6347 48 12 0 $self->{'spec'}{$key} && $self->{'option'}{$key}
7126 3 0 3 &blessed($e) && $e->isa('SQL::Yapp::Check')
7140 7 0 0 &blessed($e) && $e->isa('SQL::Yapp::Check')

or 2 conditions

line l !l condition
707 3 0 $_[0] || 'Error'
785 70 384 $opt{'rhs'} || 'expr'
0 454 $opt{'rhs_map'} || {}
60 394 $opt{'dialect'} || {}
1279 0 235 $interpol || 'Expr'
1820 9 315 $arr ||= []
2706 5 178 $right_mark || ''
4269 380 384 $opt{'prefix'} ||= ''
4270 42 722 $opt{'suffix'} ||= ''
4271 407 357 $opt{'sep'} ||= ''
4308 18 3 $opt{'suffix'} || undef
5380 63 0 $f->{'type'} or ''
5408 95 0 $f->{'type'} or ''
5540 1 0 $lx->{'error'} ||= 'Unknown error'
5687 20 238 $3 || 'Stmt'
6523 58 9 $functor_prefix{$name} || {'value', $name, 'type', 'funcall'}

or 3 conditions

line l !l&&r !l&&!r condition
718 205 0 0 $quote_val || $quote_val_default || do { croak("Error: No quote() function set.\n\tUse SQL::Yapp::quote() or SQL::Yapp::dbh().\n") }
729 379 0 0 $quote_id || $quote_id_default || do { croak("Error: No quote_identifier() function set.\n\tUse SQL::Yapp::quote_identifier() or SQL::Yapp::dbh().\n") }
767 15 439 0 $opt{'read_value'} || $value
768 35 419 0 $opt{'read_type'} || $type
1681 8571 2 392 ref $result or not defined $result
2594 0 0 190 $left->{'rhs_map'}{$arg_i} || $left->{'rhs'}
3355 94 0 0 $read_dialect{'mysql'} || $read_dialect{'postgresql'}
3863 1 0 1 &looking_at($lx, 'AS', 1) or &looking_at($lx, \@SELECT_INITIAL)
3870 2 0 0 scalar @{$r->{'column_def'};} or $r->{'select'}
4070 0 0 3 $lx->{'token'}{'type'} eq 'num' or $lx->{'token'}{'type'} eq 'string'
4275 244 0 46 $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq ''
21 0 1 $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq $opt{'prefix'} . $opt{'suffix'}
4496 3 0 858 $token->{'perltype'} eq 'array' or $token->{'perltype'} eq 'hash'
4504 207 151 116 not $in_list or $thing->{'token'}{'perltype'} eq 'scalar'
4572 321 0 188 $ident_context{$family}{scalar @token} || (scalar @token == 1 ? [$family] : [map('none', 1 .. scalar @token)])
4581 166 304 39 not $in_list or scalar @non_scalar_i == 0
4632 5 0 101 defined $limit_cnt or defined $limit_offset
5291 239 53 74 $thing->{'token'}{'type'} eq 'num' || $thing->{'token'}{'type'} eq 'string' || !$parens
5484 1 0 1 defined $thing->{'length'} or $thing->{'desc'}
5689 136 122 0 $speckind || $ctxt