Branch Coverage

lib/CellBIS/SQL/Abstract/Table.pm
Criterion Covered Total %
branch 78 124 62.9


line true false branch
18 4 0 if (exists $fk->{'name'} and $fk->{'name'} ne '')
21 4 0 if (exists $fk->{'col_name'} and $fk->{'col_name'} ne '')
25 4 0 if (exists $fk->{'table_target'} and $fk->{'table_target'} ne '')
29 4 0 if (exists $fk->{'col_target'} and $fk->{'col_target'} ne '')
35 0 4 if ($size_result >= 1) { }
41 0 4 unless (exists $$col_attr{$fk->{'col_name'}})
58 4 0 if (exists $fk_table->{'ondelete'})
59 4 0 if (exists $ondelup{lc $fk_table->{'ondelete'}})
65 4 0 if (exists $fk_table->{'onupdate'})
66 4 0 if (exists $ondelup{lc $fk_table->{'onupdate'}})
67 4 0 if $ondel == 1
84 4 6 if (exists $table_attr->{'fk'})
87 4 0 if (exists $table_attr->{'fk'})
94 4 0 if ($fk_table->{'attr'})
97 2 2 if ($db_type eq 'sqlite') { }
100 0 2 if $fk_attr eq ''
102 2 0 unless $fk_attr eq ''
106 1 1 if $db_type eq 'mariadb'
110 0 2 if $fk_attr eq ''
112 2 0 unless $fk_attr eq ''
121 0 10 if (exists $table_attr->{'index'})
122 0 0 if (ref $table_attr->{'index'} eq 'ARRAY' and scalar @{$table_attr->{'index'};} > 0)
133 3 7 if (exists $table_attr->{'engine'})
138 3 7 if $engine == 1
142 2 8 exists $table_attr->{'charset'} ? :
156 10 0 if (ref $col_attr eq 'HASH')
169 9 38 if (exists $col_name->{'is_autoincre'})
184 10 37 if (exists $col_name->{'is_primarykey'})
195 10 0 if ($size_pk >= 1)
207 9 1 if ($size_ai >= 1)
236 0 0 if ($type eq 'datetime')
237 0 0 if ($attr == 1)
240 0 0 if ($attr eq 'yes')
254 47 0 if (exists $attr->{'type'})
255 33 14 if ($db_type eq 'sqlite') { }
258 33 0 exists $attr->{'type'}{'name'} ? :
265 14 0 exists $attr->{'type'}{'name'} ? :
268 13 1 exists $attr->{'type'}{'size'} ? :
273 47 0 unless (exists $attr->{'custom'})
274 0 47 if (exists $attr->{'default'} and $attr->{'default'} ne '')
275 0 0 if (exists $attr->{'onupdate'} and $attr->{'onupdate'} ne '') { }
285 0 47 if (exists $attr->{'onupdate'} and $attr->{'onupdate'} ne '')
291 17 30 if (exists $attr->{'is_null'}) { }
292 17 0 unless $attr->{'is_null'}
293 0 17 if $attr->{'is_null'} == 1
299 10 37 if (exists $attr->{'is_primarykey'} and $attr->{'is_primarykey'} == 1)
303 9 38 if (exists $attr->{'is_autoincre'} and $attr->{'is_autoincre'} == 1)
304 6 3 if ($db_type eq 'sqlite') { }
327 5 5 if ($arg_len == 3)
331 5 5 if ($arg_len == 4)
333 5 0 if (ref $table_attr eq 'HASH') { }
341 0 10 if ($arg_len >= 5)
365 5 5 if ($size_tblAttr != 0) { }
368 4 1 if (exists $table_attr->{'fk'})
373 0 5 if (exists $table_attr->{'index'})
377 5 0 if (exists $table_attr->{'attr'} and $table_attr->{'attr'} ne '') { }
378 4 1 if ($size_fk == 1) { }
380 3 1 $db_type eq 'sqlite' || $db_type eq 'pg' ? :
384 1 0 $db_type eq 'sqlite' || $db_type eq 'pg' ? :
389 0 0 $db_type eq 'sqlite' || $db_type eq 'pg' ? :
396 4 1 $db_type eq 'sqlite' || $db_type eq 'pg' ? :
414 3 0 if (exists $list_engine{$engine}) { }