Branch Coverage

blib/lib/DBR/Config/Table.pm
Criterion Covered Total %
branch 33 64 51.5


line true false branch
31 0 51 unless ref $schema_ids eq 'ARRAY'
33 0 51 unless @$schema_ids
41 0 51 unless my $tables = $dbrh->select(-'table', 'dbr_tables', -'fields', 'table_id schema_id name', -'where', {'schema_id', ['d in', @{$schema_ids;}]})
46 0 82 unless 'DBR::Config::Schema'->_register_table('schema_id', $$table{'schema_id'}, 'name', $$table{'name'}, 'table_id', $$table{'table_id'})
63 34 17 if (@table_ids)
64 0 34 unless 'DBR::Config::Field'->load('session', $$self{'session'}, 'instance', $instance, 'table_id', \@table_ids)
70 0 34 unless 'DBR::Config::Relation'->load('session', $$self{'session'}, 'instance', $instance, 'table_id', \@table_ids)
84 0 344 unless my $table_id = $params{'table_id'}
85 0 344 unless $TABLES_BY_ID{$table_id}
87 0 344 unless my $name = $params{'name'}
88 0 344 unless my $field_id = $params{'field_id'}
89 0 344 unless defined $params{'is_pkey'}
93 82 262 if ($params{'is_pkey'})
94 90 254 if ($params{'is_req'})
103 0 48 unless my $table_id = $params{'table_id'}
104 0 48 unless $TABLES_BY_ID{$table_id}
106 0 48 unless my $name = $params{'name'}
107 0 48 unless my $relation_id = $params{'relation_id'}
126 0 364 unless $$self{'table_id'}
127 0 364 unless $$self{'session'}
129 0 364 unless $TABLES_BY_ID{$$self{'table_id'}}
138 0 0 $params{'with_alias'} ? :
152 0 284 unless my $name = shift()
156 0 284 unless my $field = 'DBR::Config::Field'->new('session', $$self{'session'}, 'field_id', $field_id)
166 0 103 unless 'DBR::Config::Field'->new('session', $$self{'session'}, 'field_id', $_)
175 0 4 unless 'DBR::Config::Field'->new('session', $$self{'session'}, 'field_id', $_)
184 0 37 unless 'DBR::Config::Field'->new('session', $$self{'session'}, 'field_id', $_)
192 0 9 unless my $name = shift()
194 0 9 unless my $relation_id = $RELATIONS_BY_NAME{$$self{'table_id'}}{$name}
197 0 9 unless my $relation = 'DBR::Config::Relation'->new('session', $$self{'session'}, 'relation_id', $relation_id, 'table_id', $$self{'table_id'})
213 0 35 unless my $relation = 'DBR::Config::Relation'->new('session', $$self{'session'}, 'relation_id', $relation_id, 'table_id', $$self{'table_id'})
250 0 0 unless return 'DBR::Config::Instance'->lookup('session', $$self{'session'}, 'guid', $guid)