line |
true |
false |
branch |
152
|
5 |
108 |
if (defined $self->relationship_attrs) |
153
|
2 |
3 |
unless ref $self->relationship_attrs eq "HASH" or ref $self->relationship_attrs eq "CODE" |
165
|
0 |
856 |
if not defined $relname or $relname eq "" |
170
|
404 |
452 |
if (ref $self->inflect_plural eq 'HASH') { } |
|
0 |
452 |
elsif (ref $self->inflect_plural eq 'CODE') { } |
171
|
6 |
398 |
if (exists $self->inflect_plural->{$relname}) |
178
|
0 |
0 |
if ($inflected) |
184
|
6 |
850 |
if $mapped |
193
|
0 |
696 |
if not defined $relname or $relname eq "" |
198
|
297 |
399 |
if (ref $self->inflect_singular eq 'HASH') { } |
|
0 |
399 |
elsif (ref $self->inflect_singular eq 'CODE') { } |
199
|
6 |
291 |
if (exists $self->inflect_singular->{$relname}) |
206
|
0 |
0 |
if ($inflected) |
212
|
6 |
690 |
if $mapped |
265
|
136 |
1090 |
unless $self->_default_relationship_attrs->{$reltype} |
266
|
0 |
1226 |
unless $db_attrs |
269
|
544 |
2 |
unless $r->{'all'} |
270
|
497 |
49 |
unless $r->{$reltype} |
|
546 |
680 |
ref $r eq 'HASH' ? : |
277
|
2 |
1224 |
if (ref $r eq "CODE") |
280
|
0 |
2 |
unless &$r(%$params) |
282
|
2 |
0 |
if %ret |
285
|
1145 |
81 |
%composite ? : |
305
|
328 |
224 |
if $nullable and not defined $attrs->{'join_type'} |
336
|
504 |
49 |
if (scalar keys %{$cond;} == 1) { } |
351
|
14 |
1286 |
if $relname eq "id" |
355
|
14 |
1272 |
if ($self->loader->_is_result_class_method($relname, $table)) |
356
|
12 |
2 |
if (my $map = $self->rel_collision_map) |
358
|
6 |
6 |
if (my(@matches) = $relname =~ /$re/) |
388
|
115 |
770 |
unless shift @tables |
393
|
0 |
611 |
unless $rel->{'remote_source'} |
399
|
0 |
611 |
unless my $remote_moniker = $rel->{'remote_source'} |
407
|
0 |
611 |
if ($#$local_cols != $#$remote_cols) |
503
|
16 |
651 |
if $dups |
518
|
551 |
116 |
unless @rels == 2 |
522
|
109 |
116 |
$this ? : |
537
|
295 |
191 |
if $_->{'method'} eq "has_many" and $_->{'args'}[1] eq $link_class |
540
|
7 |
218 |
unless $class{'link_table_rel'} |
564
|
77 |
32 |
unless &array_eq([sort(&uniq(@{$class[0]{"from_link_cols"};}, @{$class[1]{"from_link_cols"};}))], [sort(@link_table_primary_cols)]) and $self->allow_extra_m2m_cols || @link_table_cols == @link_table_primary_cols |
569
|
32 |
32 |
$this ? : |
589
|
32 |
32 |
$this ? : |
632
|
665 |
18 |
unless %dups |
640
|
2 |
12 |
unless $self->__tagger |
665
|
0 |
0 |
$self->loader->naming->{'force_ascii'} ? : |
683
|
0 |
16 |
if ($tables[0]->can('database') and &uniq(map(($_->database || ''), @tables)) > 1) { } |
|
0 |
16 |
elsif (&uniq(map(($_->schema || ''), @tables)) > 1) { } |
696
|
0 |
0 |
$use_schema ? : |
713
|
18 |
14 |
if $rel->{'method'} =~ /^(?:belongs_to|many_to_many)\z/ |
725
|
7 |
7 |
if (not @adjectives and grep({$_->{'args'}[1] eq $to_class if $_->{'method'} eq "might_have";} @{$$all_code{$in_class};}) == 1) |
727
|
7 |
14 |
if $_->{'method'} eq "might_have" |
732
|
14 |
0 |
if (@adjectives) |
735
|
14 |
0 |
$rel->{'method'} eq 'might_have' ? : |
758
|
2 |
14 |
if ($dups = $self->_duplicates($all_code->{$in_class})) |
773
|
2 |
0 |
$rel->{'method'} =~ /^(?:many_to_many|has_many)\z/ ? : |
790
|
2 |
0 |
if ($rel->{'method'} eq 'many_to_many') { } |
817
|
0 |
2 |
unless $mapped |
851
|
68 |
478 |
if (&array_eq([$local_source->primary_columns], $local_cols) or &first(sub {
&array_eq($_->[1], $local_cols);
}
, @$uniqs)) |
859
|
184 |
362 |
if ($counters->{$remote_moniker} > 1) |
862
|
111 |
73 |
if (-f (my $existing_remote_file = $self->loader->get_dump_filename($remote_class))) |
865
|
48 |
63 |
unless ("Class::Inspector"->loaded($class)) |
873
|
0 |
48 |
if $@ |
878
|
5 |
106 |
if ($class->has_relationship($remote_relname)) |
882
|
5 |
0 |
if &array_eq([sort(@$local_cols)], $rel_cols) |
886
|
179 |
5 |
unless ($relationship_exists) |
888
|
28 |
151 |
if keys %$cond > 1 |
896
|
2 |
177 |
if ($remote_method eq "might_have") |
910
|
1237 |
64 |
unless $extra |
930
|
18 |
1285 |
if ('HASH' eq ref $map) { } |
|
15 |
1270 |
elsif ('CODE' eq ref $map) { } |
933
|
3 |
15 |
if ($map->{$moniker} and 'HASH' eq ref $map->{$moniker} and $map->{$moniker}{$name}) { } |
|
3 |
24 |
elsif ($map->{$name} and not 'HASH' eq ref $map->{$name}) { } |
947
|
1 |
2 |
unless "HASH" eq ref $cb_map |
953
|
6 |
8 |
if ($name) |