Condition Coverage

blib/lib/SQL/Yapp.pm
Criterion Covered Total %
condition 146 290 50.3


and 3 conditions

line !l l&&!r l&&r condition
1958 0 0 1 $r->{'length'} = &parse_limit_expr($lx) and &expect($lx, ')', 1)
2006 0 0 2 $stmt = &parse_select_stmt($lx) and &expect($lx, ')', 1)
2086 0 0 59 &expect($lx, '(', 1) and my $list = &parse_list([], $lx, $func, ',', ')')
0 0 59 &expect($lx, '(', 1) and my $list = &parse_list([], $lx, $func, ',', ')') and &expect($lx, ')', 1)
2309 0 0 1 my $r = &parse_type_list($lx) and &expect($lx, ')', 1)
2339 0 0 3 $r->{'table'} = &parse_table($lx) and $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name)
2591 0 0 9 my $r = &parse_expr_list($lx) and &expect($lx, ')', 1)
2683 11 0 9 $functor and $functor->{'allow_when'}
2691 0 0 20 $cond and &expect($lx, 'THEN', 1)
0 0 20 $cond and &expect($lx, 'THEN', 1) and my $expr = &parse_expr($lx)
2705 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)
2721 182 0 1 ($right_mark || '') eq 'string' and $right->{'value'} eq 'IN'
2730 3 0 1 $left->{'value'} eq $right->{'value'} and $left->{'read_type'} eq 'infix()'
2735 0 0 0 $left->{'prec'} and $right->{'prec'}
2743 0 0 0 $left->{'assoc'} and $right->{'assoc'}
0 0 0 $left->{'assoc'} and $right->{'assoc'} and $left->{'assoc'} == $right->{'assoc'}
2746 0 0 0 $left->{'assoc'} == -1 and $right_mark
2858 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)
2927 6 0 1 &looking_at($lx, '(', 1) and my $functor = &find_functor(\%functor_special, $r->{'token'}{'kind'})
2933 0 0 1 my $arg = &parse_column_name($lx) and &expect($lx, ')', 1)
2951 0 0 22 $r->{'switchval'} = &parse_expr($lx) and $r->{'arg'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_when_post)
2981 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)
3017 68 0 11 not $functor2 and $lx->{'token'}{'type'} eq 'keyword'
3045 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)
3053 0 0 6 &expect($lx, '(', 1) and &parse_funcsep($lx, $r, $functor2->{'rhs'})
3325 0 0 99 $r->{'from'} = &parse_list([], $lx, \&SQL::Yapp::parse_table_as, ',') and $r->{'join'} = &parse_try_list([], $lx, \&SQL::Yapp::parse_join)
3358 2 96 1 not $r->{'limit_offset'} and &looking_at($lx, 'OFFSET', 1)
3466 0 12 1 $read_dialect{'mysql'} and &looking_at($lx, 'ON DUPLICATE KEY UPDATE', 1)
3519 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, ',')
3684 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)
3692 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)
3700 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)
3708 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)
3716 0 0 2 $r->{'column'} = &parse_list_delim($lx, \&SQL::Yapp::parse_column_name) and $r->{'reference'} = &parse_references($lx)
3835 0 0 6 $r->{'name'} = &parse_column_name($lx) and $r->{'column_spec'} = &parse_column_spec($lx)
3864 0 1 1 $read_dialect{'mysql'} and &looking_at($lx, 'IF NOT EXISTS', 1)
3912 0 0 1 $read_dialect{'mysql'} and &looking_at($lx, 'IF EXISTS', 1)
3979 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)
4037 0 0 1 my $col1 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4053 0 0 1 my $col1 = &parse_column_name($lx) and my $spec = &parse_column_spec($lx)
4060 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)
4298 390 0 299 $opt{'prefix'} eq '' and $opt{'suffix'} eq ''
390 299 0 $opt{'prefix'} eq '' and $opt{'suffix'} eq '' and $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq ''
405 22 0 $opt{'sep'} eq '' and $opt{'never_empty'} || defined $opt{'result0'} && $opt{'result0'} eq $opt{'prefix'} . $opt{'suffix'}
4467 1036 32 0 $allow and scalar grep({$token->{'kind'} eq $_;} &flatten($allow)) == 0
5734 0 0 258 defined $end and $start < $end
5844 731 0 159 &blessed($x) and $x->isa('SQL::Yapp::Obj1')
6231 0 0 7 &blessed($x) and $x->isa('SQL::Yapp::Obj')
6345 0 1 19 $self->{'spec'}{'prec1'} and defined $self->{'option'}{'prec1'}
6348 16 3 0 $self->{'spec'}{'prec2'} and defined $self->{'option'}{'prec2'}
6352 19 0 0 $self->{'spec'}{'prec_mul'} and $self->{'option'}{'prec_mul'}
6355 19 0 0 $self->{'spec'}{'prec_unit'} and $self->{'option'}{'prec_unit'}
6361 20 0 0 $self->{'spec'}{'value_list'} && $self->{'option'}{'value_list'}
6364 6 11 3 $self->{'spec'}{'charset'} && $self->{'option'}{'charset'}
6367 6 14 0 $self->{'spec'}{'collate'} && $self->{'option'}{'collate'}
6371 48 12 0 $self->{'spec'}{$key} && $self->{'option'}{$key}
7150 3 0 3 &blessed($e) && $e->isa('SQL::Yapp::Check')
7164 7 0 0 &blessed($e) && $e->isa('SQL::Yapp::Check')

or 2 conditions

line l !l condition
707 3 0 $_[0] || 'Error'
785 70 391 $opt{'rhs'} || 'expr'
0 461 $opt{'rhs_map'} || {}
60 401 $opt{'dialect'} || {}
1280 0 235 $interpol || 'Expr'
1821 9 321 $arr ||= []
2721 5 178 $right_mark || ''
4292 390 393 $opt{'prefix'} ||= ''
4293 42 741 $opt{'suffix'} ||= ''
4294 420 363 $opt{'sep'} ||= ''
4331 18 3 $opt{'suffix'} || undef
5403 63 0 $f->{'type'} or ''
5431 97 0 $f->{'type'} or ''
5563 1 0 $lx->{'error'} ||= 'Unknown error'
5710 20 238 $3 || 'Stmt'
6547 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 446 0 $opt{'read_value'} || $value
768 35 426 0 $opt{'read_type'} || $type
1682 8698 2 405 ref $result or not defined $result
2609 0 0 190 $left->{'rhs_map'}{$arg_i} || $left->{'rhs'}
3378 99 0 0 $read_dialect{'mysql'} || $read_dialect{'postgresql'}
3886 1 0 1 &looking_at($lx, 'AS', 1) or &looking_at($lx, \@SELECT_INITIAL)
3893 2 0 0 scalar @{$r->{'column_def'};} or $r->{'select'}
4093 0 0 3 $lx->{'token'}{'type'} eq 'num' or $lx->{'token'}{'type'} eq 'string'
4298 251 0 48 $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'}
4519 3 0 867 $token->{'perltype'} eq 'array' or $token->{'perltype'} eq 'hash'
4527 209 151 116 not $in_list or $thing->{'token'}{'perltype'} eq 'scalar'
4595 327 192 0 $ident_context{$family}{scalar @token} || (scalar @token == 1 ? [$family] : [map('none', 1 .. scalar @token)])
4604 166 311 42 not $in_list or scalar @non_scalar_i == 0
4655 5 0 106 defined $limit_cnt or defined $limit_offset
5314 239 53 74 $thing->{'token'}{'type'} eq 'num' || $thing->{'token'}{'type'} eq 'string' || !$parens
5507 1 1 0 defined $thing->{'length'} or $thing->{'desc'}
5712 136 122 0 $speckind || $ctxt