| web/cgi-bin/yatt.lib/YATT/DBSchema.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % | 
| condition | 0 | 66 | 0.0 | 
| line | !l | l&&!r | l&&r | condition | 
|---|---|---|---|---|
| 189 | 0 | 0 | 0 | defined $rwflag && $rwflag =~ /ro/i | 
| 385 | 0 | 0 | 0 | $col->{'cf_type'} =~ /^int/i and $col->{'cf_primary_key'} | 
| 620 | 0 | 0 | 0 | $enc and $depth < coalesce($until, 1) | 
| 662 | 0 | 0 | 0 | $params->{'offset'} and not $params->{'limit'} | 
| 772 | 0 | 0 | 0 | @res == 1 and defined $res[0] | 
| 0 | 0 | 0 | @res == 1 and defined $res[0] and $res[0] eq '1' | 
| line | l | !l | condition | 
|---|---|---|---|
| 546 | 0 | 0 | delete $param{'separator'} || "\t" | 
| 564 | 0 | 0 | $fetch[0] || 'arrayref' | 
| 764 | 0 | 0 | shift() || 'help' | 
| line | l | !l&&r | !l&&!r | condition | 
|---|---|---|---|---|
| 163 | 0 | 0 | 0 | $spec ||= $schema->connection_spec | 
| 227 | 0 | 0 | 0 | $dbh ||= $schema->dbh | 
| 238 | 0 | 0 | 0 | $dbh || $schema->dbh | 
| 244 | 0 | 0 | 0 | $dbh ||= $schema->dbh | 
| 262 | 0 | 0 | 0 | $self->{'tables'}{$name} ||= do { push @{$$self{'schemas'};}, my YATT::DBSchema::Table $tab = $self->Table->new; $tab->{'cf_name'} = $name; if (@columns) { $tab->{'raw_create'} = $opts; my $fields = $tab->fields_hash; foreach my $desc (@columns) { if (ref(my $kw = $desc->[0])) { if (not $$fields{my $fname = "chk_$$kw"}) { croak("Invalid column constraint $kw for table $name"); } else { push @{$$tab{$fname};}, [@{$desc;}[1 .. $#$desc]]; }; } else { my($col, $type, @desc) = @$desc; $self->add_table_column($tab, $col, $type, map({if (/^-(\w+)/) { $1, 1; } else { $_; };} @desc)); }; }; } elsif (not ref $opts) { $self->add_table_column($tab, $name . 'no', 'integer', 'primary_key', 1); $self->add_table_column($tab, $name, $opts, 'unique', 1); } else { die "Unknown table desc $name $opts"; }; $tab } | 
| 312 | 0 | 0 | 0 | $colName =~ s/^-// || $col->{'cf_auto_increment'} | 
| 341 | 0 | 0 | 0 | $opts->{'dbtype'} || $schema->dbtype | 
| 342 | 0 | 0 | 0 | $schema->can($dbtype . '_sql_create_column') || $schema->can('sql_create_column') | 
| 477 | 0 | 0 | 0 | $dbh ||= $schema->dbh | 
| 608 | 0 | 0 | 0 | $alias ||= $tab->{'cf_name'} | 
| 612 | 0 | 0 | 0 | $depth or $enc | 
| 694 | 0 | 0 | 0 | $colExpr || join(', ', @$selCols) | 
| 706 | 0 | 0 | 0 | delete $params->{'dbh'} || $schema->dbh | 
| 789 | 0 | 0 | 0 | ref $self || $self |