Branch Coverage

blib/lib/SQL/Translator/Parser/DBIx/Class.pm
Criterion Covered Total %
branch 88 116 75.8


line true false branch
43 3 66 if (defined(my $s = delete $args->{$_}))
47 3 0 unless ($dbicschema)
53 0 23 unless $dbicschema
55 1 22 unless (ref $dbicschema)
56 0 1 unless eval "require $dbicschema"
60 2 21 if (ref $args->{'dbic_schema'} and $args->{'dbic_schema'}->storage)
76 23 0 unless $schema->name
80 1 22 if (my $limit_sources = $args->{'sources'})
82 0 1 unless $ref eq 'ARRAY' or ref $_ eq 'HASH'
87 1 0 if ($ref eq 'ARRAY') { }
99 929 43 if ($source->isa('DBIx::Class::ResultSource::Table')) { }
43 0 elsif ($source->isa('DBIx::Class::ResultSource::View')) { }
102 21 22 if $source->is_virtual
115 44 885 if ref $table_name eq 'SCALAR'
118 63 866 if $tables{$table_name}
137 717 2097 if ($colinfo{'is_nullable'})
138 717 0 unless exists $colinfo{'default'}
146 845 21 if @primary
150 387 887 unless ($source->_compare_relationship_keys($unique_constraints{$uniq}, \@primary))
164 41 825 exists $args->{'add_fk_index'} && !$args->{'add_fk_index'} ? :
172 448 1611 unless ref $rel_info->{'cond'} eq 'HASH'
175 11 1600 unless ($relsource)
181 55 1545 unless exists $table_monikers{$relsource->source_name}
187 383 1162 if ref $rel_table eq 'SCALAR'
194 0 1734 unless (exists $other_columns_idx{$_})
210 763 782 if (exists $rel_info->{'attrs'}{'is_foreign_key_constraint'}) { }
655 127 elsif ($rel_info->{'attrs'}{'accessor'} and $rel_info->{'attrs'}{'accessor'} eq 'multi') { }
229 1166 1144 $c eq 'update' ? :
277 2813 if (exists $rel_info->{'attrs'}{"on_$c"}) { }
934 2382 elsif (defined $otherrelationship and $otherrelationship->{'attrs'}{$c eq 'update' ? 'cascade_copy' : 'cascade_delete'}) { }
230 275 2 if ($fk_constraint) { }
2 0 elsif ($rel_info->{'attrs'}{"on_$c"}) { }
243 1545 0 if ($rel_table)
245 824 721 unless $fk_constraint
249 86 635 if $created_FK_rels{$rel_table}{$key_test}
251 635 0 if (scalar @keys)
258 572 63 if (not $is_deferrable and $rel_table ne $table_name)
272 42 593 defined $is_deferrable ? :
277 21 614 exists $rel_info->{'attrs'}{'add_fk_index'} ? :
285 63 572 if join("\000", @keys) eq join("\000", @primary)
287 525 47 if ($add_fk_index_rel)
308 0 3641 unless $dependencies->{$a}
0 3641 unless $dependencies->{$b}
0 1646 unless keys %{{} unless $dependencies->{$a};} <=> keys %{{} unless $dependencies->{$b};}
318 0 866 if ($schema->get_table($table) and $table =~ /^ \s* \( \s* SELECT \s+/xi)
344 0 1 unless $$view_dependencies{$a->source_name}
345 0 1 unless $$view_dependencies{$b->source_name}
0 0 unless keys %{{} unless $$view_dependencies{$a->source_name};} <=> keys %{{} unless $$view_dependencies{$b->source_name};}
357 0 21 if ref $view_name eq 'SCALAR'
360 0 21 if ref $view_name
363 0 21 if $views{$view_name}++
365 1 20 unless $source->view_definition
378 21 1 if ($dbicschema->can('sqlt_deploy_hook'))
396 22 1920 if (&blessed($question) and $question->isa('DBIx::Class::ResultSource::View')) { }
408 256 1054 if ($seen->{$dep})
413 0 1054 if (&blessed($question) and $question->isa('DBIx::Class::ResultSource::View')) { }
419 0 0 if $question->schema->source($_)->result_class eq $dep
423 0 0 unless $next_dep_source_name