Branch Coverage

blib/lib/Dancer/Plugin/Database/Core/Handle.pm
Criterion Covered Total %
branch 37 98 37.7


line true false branch
181 0 0 if ($opts and ref $opts eq 'ARRAY')
187 0 0 if (wantarray) { }
217 0 0 $row && exists $row->{$data} ? :
239 0 0 @row ? :
251 0 0 unless ($type =~ /^ (SELECT|INSERT|UPDATE|DELETE|COUNT) $/x)
255 0 0 if (not $table_name or ref $table_name)
259 0 0 if ($type eq 'INSERT' || $type eq 'UPDATE' and !$data || ref $data ne 'HASH')
265 0 0 if ($type =~ /^ (SELECT|UPDATE|DELETE|COUNT) $/x and not $where)
281 0 0 if ($self->{'private_dancer_plugin_database'}{'log_queries'})
285 0 0 length $_ > 50 ? :
0 0 $_ =~ /^[[:ascii:]]+$/ ? :
0 0 defined $_ ? :
295 0 0 if ($type eq 'SELECT') { }
0 0 elsif ($type eq 'COUNT') { }
296 0 0 if (wantarray) { }
318 2 4 $type eq 'SELECT' && $data ? :
319 1 5 if ($opts->{'columns'})
322 1 0 ref $opts->{'columns'} ? :
336 1 5 if ($type eq 'INSERT')
341 1 1 if (ref $value eq 'SCALAR') { }
356 1 5 if ($type eq 'UPDATE')
360 1 1 ref $data->{$_} eq 'SCALAR' ? :
361 1 1 if ref $data->{$_} ne 'SCALAR'
366 4 1 if ($type eq 'UPDATE' or $type eq 'DELETE' or $type eq 'SELECT' or $type eq 'COUNT')
368 3 2 if ($where)
370 0 3 unless $where_sql
376 0 6 if (exists $opts->{'order_by'} and defined $opts->{'order_by'})
382 0 6 if (exists $opts->{'limit'} and defined $opts->{'limit'}) { }
0 8 elsif ($type eq 'SELECT' and not wantarray) { }
387 0 0 if ($limit =~ / ^ \d+ (?: , \d+)? $ /x) { }
399 0 6 if (exists $opts->{'offset'} and defined $opts->{'offset'})
402 0 0 if ($offset =~ /^\d+$/) { }
415 1 2 if ($where and not ref $where) { }
2 0 elsif (ref $where eq 'HASH') { }
0 0 elsif (ref $where) { }
421 0 3 if (ref $v eq 'HASH') { }
427 0 0 if $add_bind_param
431 0 3 if (not defined $v) { }
3 0 elsif (not ref $v) { }
0 0 elsif (ref $v eq 'ARRAY') { }
445 2 0 if keys %$where
461 0 0 if ($op eq 'is')
462 0 0 if (defined $value)
468 0 0 $not ? :
484 0 0 $not ? :
501 2 2 unless ref $in eq 'ARRAY'
506 3 3 if (not ref $field) { }
3 0 elsif (ref $field eq 'HASH') { }
511 0 3 if ($order ne 'ASC' and $order ne 'DESC')