Condition Coverage

blib/lib/SQL/Statement.pm
Criterion Covered Total %
condition 187 302 61.9


and 2 conditions

line l !l condition
146 0 5 ($self->{'NUM_OF_ROWS'}, $self->{'NUM_OF_FIELDS'}, $self->{'data'}) = (0, 0, []) and return 'OEO'
1183 30 93 $row and scalar @$row

and 3 conditions

line !l l&&!r l&&r condition
45 868 0 0 defined $main::extend_csv and $main::extend_csv
868 0 0 defined $main::extend_sql and $main::extend_sql
121 621 0 229 $self->{'where_clause'} and not defined $self->{'where_terms'}
155 4566 61 22 $self->{'where_clause'} and not defined $self->{'where_terms'}
262 3 9 0 $self->{'ignore_missing_table'} and $@ || @err || $self->{'errstr'}
4 0 5 $self->{'ignore_missing_table'} and $@ || @err || $self->{'errstr'} and grep {$_ =~ /$notblrx/;} @err, $@, $self->{'errstr'}
314 0 549 12242 $val and $val->{'type'} eq 'placeholder'
367 0 0 10 $table->capability('rowwise_delete') and $table->capability('inplace_delete')
446 0 3 6 $val and $val->{'type'} eq 'placeholder'
473 0 0 7 $table->capability('rowwise_update') and $table->capability('inplace_update')
594 40 24 0 $display_combine eq 'NATURAL' and $is_natural{$col}
595 18 40 0 $display_combine eq 'USING' and $is_natural{$col}
30 10 0 $display_combine eq 'USING' and $is_natural{$col} and $is_key_col{$col}
627 7 25 0 $self->{'join'}{'keycols'} and $self->{'join'}{'table_order'}
10 8 7 $self->{'join'}{'keycols'} and $self->{'join'}{'table_order'} and scalar @{$self->{'join'}{'table_order'};} == 0
682 37 0 7 $share_type eq 'ON' and scalar @{$self->{'join'}{'keycols'};} == 1
789 62 0 0 $isunqualA{$k1} and $isunqualA{$k2}
790 62 0 0 $isunqualB{$k1} and $isunqualB{$k2}
795 23 22 17 defined $col_numsA{$k1} and defined $col_numsB{$k2}
15 27 3 defined $col_numsA{$k2} and defined $col_numsB{$k1}
851 304 37 14 not defined $rowsB and $join_type ne 'INNER'
1002 191 4 118 $tableName eq $self->{'dlm'} . 'tmp' && $tbl ne ''
1060 133 1 1 $self->limit and not $self->order
1068 8424 3 5 defined $limit_count and $row_count++ < $offset
1075 8424 2 1 defined $limit_count and ++$limit_count >= $limit
1112 14 6 0 $self->{'join'} and $table->is_shared($col)
1155 4 0 32222 defined $a && defined $b
8058 0 24164 &looks_like_number($a) and &looks_like_number($b)
1219 4517 0 2 defined $self->{'table_func'} and defined $self->{'table_func'}{uc $name}
13 29 4475 defined $data->{'Database'}{'sql_ram_tables'} and defined $data->{'Database'}{'sql_ram_tables'}{$name}
42 4475 0 defined $data->{'Database'}{'sql_ram_tables'} and defined $data->{'Database'}{'sql_ram_tables'}{$name} and $data->{'Database'}{'sql_ram_tables'}{$name}
1313 211 276 199 $newcol->{'type'} eq 'column' and -1 != index($newcol->{'value'}, '*')
1331 181 18 0 defined &_HASH($self->{'join'}) && (-1 != index($self->{'join'}{'type'}, 'NATURAL') || -1 != index($self->{'join'}{'clause'}, 'USING'))
1342 620 24 8 $join and $shared_cols{$colName}++
1473 21 34 13088 defined &_INSTANCE($col_obj, 'SQL::Statement::Util::Column') && $col_obj->{'coldef'}{'type'} eq 'column'
1477 55 155 12933 $is_column and defined $table
1487 55 13086 2 $is_column and not $table
1531 104 4286 34 exists $self->{'join'} and defined &_HASH($self->{'join'})
1561 34 0 13086 $table and $col
1564 0 0 13086 $table and $col
0 13086 0 $table and $col and $is_fully->{$ftc}
1569 0 0 13086 $table and $col
1587 0 8 0 defined $col and not defined $table
1589 0 0 8 defined $table and defined $col
1612 0 9 4 $direction && $direction eq 'DESC'
1618 0 12 1 defined $col and not defined $table
1640 129 0 5 defined $q && 'DISTINCT' eq $q
1701 21779 0 12801 defined $col and $col =~ /^\d+$/
1746 0 0 0 defined $tbl and $tbl ne $stbl
1775 391 25 24 defined $tbl and $tbl ne $stbl
1785 1033 195 348 defined $tbl and $tbl ne $splitted_col->[0]
1828 19 0 1 defined $_[1] && &looks_like_number($_[1])
1836 9125 0 4432 defined $_[1] && &looks_like_number($_[1])
1862 0 7 0 defined $t1 and defined $t2
2046 36 16002 45 defined $agg->{'max'} and &SQL::Statement::_anycmp($colval, $agg->{'max'}) < 0
2051 36 4033 12014 defined $agg->{'min'} and &SQL::Statement::_anycmp($colval, $agg->{'min'}) > 0
2098 0 0 1 $count and $sum

or 2 conditions

line l !l condition
71 0 0 $flags->{'dialect'} || 'AnyData'
168 4597 47 $self->{'NUM_OF_ROWS'} || '0E0'
831 244 0 defined $_ or next TBLBFETCH
847 308 0 defined $_ or next TBLAFETCH
982 0 0 $tbl ||= ''
988 280 33 $tbl ||= ''
1042 19 1 $tbl ||= ''
1063 2 133 $self->offset || 0
1113 0 1 $self->colname2table($col) || ''
1134 1 0 $self->offset || 0
1135 1 0 $self->limit || 0
1181 123 0 $self->{'data'} ||= []
1195 250 0 $self->{'data'} || []
1299 502 0 $all_cols ||= []
1514 4424 0 $all_cols ||= []
1745 8 2 $scol || ''
2080 16 4 $result->{'agg'}[$colidx]{'count'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
45 0 0 868 defined $main::extend_csv and $main::extend_csv or defined $main::extend_sql and $main::extend_sql
201 0 0 0 $self->{'org_table_names'}[0] || $self->tables(0)->name
262 0 0 9 $@ || @err || $self->{'errstr'}
270 0 0 0 $@ || $err[0]
0 0 7 $@ or @err
422 5 0 0 $self->{'params'} ||= $params
659 32 0 0 $tableAobj->{'NAME'} ||= $tableA
660 32 0 0 $tableBobj->{'NAME'} ||= $tableB
667 12 0 0 $tableBobj->{'NAME'} ||= $next_table
736 0 21 23 $share_type eq 'ON' or $share_type eq 'IMPLICIT'
780 0 21 23 $share_type eq 'ON' or $share_type eq 'IMPLICIT'
811 43 43 0 defined $col_numsA{$c} or defined $col_numsB{$c}
872 2 0 42 $join_type eq 'FULL' or $join_type eq 'UNION'
875 0 1 1 -1 != index($self->{'join'}{'type'}, 'NATURAL') || -1 != index($self->{'join'}{'clause'}, 'USING')
923 329 0 19 $self->{'params'} ||= $params
1005 33 0 280 not defined $cnum or $column->{'function'}
1041 19 0 1 $tbl ||= $self->colname2table($col)
1113 19 0 1 $tbl ||= $self->colname2table($col) || ''
1165 0 0 0 lc $a cmp lc $b || $a cmp $b
1313 97 0 390 'CREATE' eq $self->command or 'DROP' eq $self->command
1410 210 0 180 $newcol->{'name'} || $newcol->{'value'}
215 0 175 $newcol->{'alias'} || $newcol->{'fullorg'}
1440 226 887 0 $self->{'column_aliases'}{$col->[4]} ||= $col->[3]
1498 13086 0 0 $$col_exists{"$table.$col"} or $$col_exists{lc($table . '.') . $col}
13086 0 0 $$col_exists{"$table.$col"} or $$col_exists{lc($table . '.') . $col} or $is_user_def
1502 13086 21 34 $is_column or ${$i;} < 0
1552 1 0 8 $_->{'alias'} || $_->{'fullorg'}
1586 8 0 0 $col ||= $grpby
1948 0 2 0 $tempTable->{'all_cols'} ||= $col_names
2249 0 13 0 ref $proto || $proto
2261 0 9 0 ref $proto || $proto