Branch Coverage

web/cgi-bin/yatt.lib/YATT/DBSchema.pm
Criterion Covered Total %
branch 0 208 0.0


line true false branch
49 0 0 if (my YATT::DBSchema::Column $pk = $tab->{'pk'}) { }
70 0 0 unless @_
86 0 0 if $schema->{'cf_as_base'}
96 0 0 if $schema->{'cf_as_base'}
106 0 0 if @_
114 0 0 if ($schema->{'cf_DBH'})
127 0 0 if (ref $item) { }
141 0 0 if ref $list->[0]
142 0 0 if ($list->[0] =~ /^-(\w+)/) { }
145 0 0 unless @$list >= 2
162 0 0 unless ($schema->{'cf_DBH'})
163 0 0 unless (defined($spec ||= $schema->connection_spec))
166 0 0 if (ref $spec eq 'ARRAY') { }
0 0 elsif (ref $spec eq 'CODE') { }
180 0 0 if (my $sub = $schema->can("connect_to_$dbtype")) { }
199 0 0 unless defined $param{$_->[0]}
202 0 0 if ($dbi_dsn =~ /^dbi:(\w+):/)
206 0 0 if $schema->{'cf_auto_create'}
215 0 0 @spec ? :
217 0 0 if $schema->has_table($table->{'cf_name'}, $dbh)
219 0 0 if $schema->{'cf_verbose'}
267 0 0 if (@columns) { }
0 0 elsif (not ref $opts) { }
272 0 0 if (ref(my $kw = $desc->[0])) { }
273 0 0 if (not $$fields{my $fname = "chk_$$kw"}) { }
281 0 0 if (/^-(\w+)/) { }
305 0 0 if ($tab->{'colNames'}{$colName})
316 0 0 if (ref $type) { }
324 0 0 if ($col->{'cf_primary_key'})
346 0 0 if $col->{'cf_indexed'}
348 0 0 $_ ? :
364 0 0 $_ ? :
366 0 0 wantarray ? :
380 0 0 $col->{'cf_primary_key'} ? :
0 0 $col->{'cf_unique'} ? :
0 0 $col->{'cf_auto_increment'} ? :
385 0 0 if ($col->{'cf_type'} =~ /^int/i and $col->{'cf_primary_key'}) { }
404 0 0 ref $method ? :
409 0 0 $wantarray ? :
412 0 0 wantarray ? :
419 0 0 unless my YATT::DBSchema::Table $tab = $schema->{'tables'}{$tabName}
422 0 0 @fields ? :
423 0 0 if (not my $colno = $tab->{'colNames'}{$_}) { }
429 0 0 unless $col->{'cf_hidden'}
430 0 0 if (my YATT::DBSchema::Table $encTab = $col->{'cf_encoded_by'})
440 0 0 wantarray ? :
448 0 0 if (not $fields) { }
0 0 elsif (ref $fields) { }
456 0 0 if $schema->{'cf_verbose'}
478 0 0 ref $encDesc ? :
484 0 0 if $schema->{'cf_verbose'}
489 0 0 if $schema->{'cf_verbose'}
498 0 0 unless (defined $rowid)
521 0 0 if %opts
524 0 0 if (my $sub = $self->can("select_$table")) { }
0 0 elsif ($sub = $self->can("sql_select_$table")) { }
533 0 0 $bind ? :
536 0 0 unless $self->{'cf_no_header'}
547 0 0 if delete $param{'tsv'}
550 0 0 if @fetch > 1
554 0 0 if ($is_text) { }
558 0 0 if $schema->{'cf_no_header'}
559 0 0 unless my $res = $sth->fetchall_arrayref
562 0 0 defined $header ? :
565 0 0 $bind ? :
575 0 0 if @fetch > 1
576 0 0 unless $fetch[0]
580 0 0 $bind ? :
581 0 0 wantarray ? :
584 0 0 $bind ? :
0 0 wantarray ? :
591 0 0 $bind ? :
598 0 0 ref $columns ? :
601 0 0 $bind ? :
0 0 wantarray ? :
607 0 0 unless defined $depth
612 0 0 if ($depth or $enc) { }
615 0 0 unless $col->{'cf_primary_key'}
620 0 0 if ($enc and $depth < coalesce($until, 1))
638 0 0 if (my $sub = $schema->can("sql_select_$tabName"))
642 0 0 unless my YATT::DBSchema::Table $tab = $schema->{'tables'}{$tabName}
649 0 0 if (my $where = delete $params->{'where'})
651 0 0 if (ref $where) { }
662 0 0 if ($params->{'offset'} and not $params->{'limit'})
667 0 0 if (my $val = delete $params->{$kw})
673 0 0 if %$params
676 0 0 @bind ? :
684 0 0 if (@_) { }
0 0 elsif ($raw) { }
694 0 0 $raw ? :
699 0 0 defined $bind ? :
0 0 wantarray ? :
721 0 0 if (not defined $_) { }
0 0 elsif ((my $val = $_) =~ s/[\t\n]/ /g) { }
736 0 0 if $schema->{'cf_verbose'}
754 0 0 defined $_ ? :
762 0 0 unless @_
767 0 0 if (my $sub = $obj->can("cmd_$cmd")) { }
0 0 elsif ($sub = $obj->can($cmd)) { }
771 0 0 unless @res
772 0 0 unless (@res == 1 and defined $res[0] and $res[0] eq '1')
773 0 0 if defined $_
0 0 if (grep {ref $_ if defined $_;} @res) { }
805 0 0 $as_utc ? :