blib/lib/DBIx/Class/ResultSource.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 146 | 224 | 65.1 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
404 | 59288 | 42 | 1 | not $self->_columns->{$column}{'data_type'} || $self->{'_columns_info_loaded'} and $self->column_info_from_storage |
59330 | 0 | 1 | not $self->_columns->{$column}{'data_type'} || $self->{'_columns_info_loaded'} and $self->column_info_from_storage and my $stor = &try(sub { $self->storage; } ) | |
478 | 47076 | 0 | 16 | &first(sub { not $_->{'data_type'}; } , values %$colinfo) and not $self->{'_columns_info_loaded'} |
47076 | 13 | 3 | &first(sub { not $_->{'data_type'}; } , values %$colinfo) and not $self->{'_columns_info_loaded'} and $self->column_info_from_storage | |
13 | 2 | 1 | &first(sub { not $_->{'data_type'}; } , values %$colinfo) and not $self->{'_columns_info_loaded'} and $self->column_info_from_storage and my $stor = &try(sub { $self->storage; } ) | |
806 | 0 | 325 | 325 | not @constraints % 2 and &first(sub { ref $_ ne 'ARRAY'; } , @constraints) |
994 | 0 | 0 | 0 | $class and $class->can('sqlt_deploy_hook') |
1516 | 465 | 0 | 1571 | $self->_compare_relationship_keys([keys %$stripped_cond], [values %$other_stripped_cond]) and $self->_compare_relationship_keys([values %$stripped_cond], [keys %$other_stripped_cond]) |
1568 | 0 | 0 | 833 | $set and @$set |
1571 | 200 | 3 | 813 | $colinfos->{$_} and not $colinfos->{$_}{'is_nullable'} |
1610 | 1368 | 37 | 2804 | $cols->{'missing'} && exists $cols->{'missing'}{$col} |
2804 | 1401 | 4 | not $cols->{'missing'} && exists $cols->{'missing'}{$col} and keys %{{} unless $args->{'columns_info'}{$col}{'_filter_info'};} | |
1625 | 1257 | 0 | 2 | $cols->{'undefined'} and not $ENV{'DBIC_NULLABLE_KEY_NOWARN'} |
1655 | 336 | 92 | 1965 | defined $join && length $join |
1677 | 250 | 0 | 6 | $seen->{$rel} && $seen->{$rel} + 1 |
1695 | 1123 | 0 | 54 | $count > 1 && $count |
1836 | 1254 | 92 | 2811 | $rc->{'join_free_condition'} and ref $res[0] eq 'HASH' |
1901 | 0 | 5978 | 0 | $rel_info and exists $rel_info->{'_original_name'} |
1904 | 1798 | 4180 | 0 | exists $args->{'self_result_object'} and exists $args->{'foreign_values'} |
1907 | 4729 | 1249 | 0 | exists $args->{'infer_values_based_on'} and ref $args->{'infer_values_based_on'} ne 'HASH' |
1917 | 0 | 0 | 4180 | defined &blessed($args->{'self_result_object'}) && $args->{'self_result_object'}->isa('DBIx::Class::Row') |
1798 | 4180 | 0 | exists $args->{'self_result_object'} and not defined &blessed($args->{'self_result_object'}) && $args->{'self_result_object'}->isa('DBIx::Class::Row') | |
2030 | 18 | 18 | 0 | length ref $_ and defined &blessed($_) |
36 | 0 | 0 | length ref $_ and defined &blessed($_) and $_->isa('DBIx::Class::Row') | |
18 | 0 | 0 | length ref $_ and defined &blessed($_) and $_->isa('DBIx::Class::Row') and $self->throw_exception("The join-free condition returned for $exception_rel_id may not " . 'contain result objects as values - perhaps instead of invoking ' . '->$something you meant to return ->get_column($something)') | |
2110 | 17 | 17 | 0 | $ret and ($ret->{'join_free_condition'} xor $subcond->{'join_free_condition'}) |
2112 | 14 | 54 | 0 | $subcond->{$_} and push @{$$ret{$_};}, $subcond->{$_} |
2123 | 4731 | 1244 | 0 | $args->{'require_join_free_condition'} and !$ret->{'join_free_condition'} || $ret->{'join_free_condition'} eq \'1 = 0' |
2130 | 1310 | 88 | 4576 | my $jfc = $ret->{'join_free_condition'} and $ret->{'join_free_condition'} ne \'1 = 0' |
2140 | 11 | 0 | 4637 | exists $jfc_eqs->{$_} and ($jfc_eqs->{$_} || '') ne \'1 = 0' |
9 | 1 | 1 | $args->{'infer_values_based_on'} && exists $args->{'infer_values_based_on'}{$col} | |
2192 | 36 | 0 | 2 | $col_eqs->{$lhs} =~ /^ ( \Q$args->{'self_alias'}\E \. .+ ) /x and ($colinfos->{$1} || {})->{-'result_source'} == $rel_rsrc |
2194 | 176 | 0 | 8 | $$colinfos{$rhs_ref->[0]} and $colinfos->{$lhs}{-'source_alias'} ne $$colinfos{$rhs_ref->[0]}{-'source_alias'} |
line | l | !l | condition |
---|---|---|---|
127 | 125880 | 519 | $new->{'resultset_class'} ||= 'DBIx::Class::ResultSet' |
132 | 126399 | 0 | $new->{'name'} ||= '!!NAME NOT SET!!' |
133 | 0 | 126399 | $new->{'_columns_info_loaded'} ||= 0 |
514 | 1 | 0 | $self->source_name || $self->name || 'Unknown source...?' |
620 | 1 | 0 | $self->source_name || $self->name || 'Unknown source...?' |
652 | 0 | 0 | $self->source_name || $self->result_class || $self->name || 'Unknown source...?' |
667 | 0 | 0 | $self->source_name || $self->result_class || $self->name || 'Unknown source...?' |
749 | 0 | 0 | $cols || 'NOTHING' |
1230 | 63 | 25 | $_[0]{'source_name'} || '_unnamed_' |
1344 | 29093 | 2 | $attrs ||= {} |
1347 | 29095 | 0 | ref $cond || '' |
1502 | 8247 | 0 | $roundtrip_rsrc->source_name || '' |
1594 | 1396 | 10 | $vals->{$col} || '' |
1673 | 135 | 54 | $rel_info->{'attrs'}{'join_type'} || '' |
1718 | 289 | 888 | $$seen{-'relation_chain_depth'} || 0 |
1803 | 7 | 0 | $res_args[$_] ||= {} |
1946 | 7 | 2 | $args->{'foreign_values'} ||= {} |
2140 | 4609 | 28 | $jfc_eqs->{$_} || '' |
2162 | 1242 | 5 | $ret->{'inferred_values'} ||= {} |
2192 | 2 | 0 | $colinfos->{$1} || {} |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
404 | 59288 | 0 | 43 | $self->_columns->{$column}{'data_type'} || $self->{'_columns_info_loaded'} |
422 | 4 | 0 | 0 | $info->{$col} or $$lc_info{lc $col} |
500 | 4 | 0 | 0 | $info->{$col} or $$lc_info{lc $col} |
756 | 16173 | 3387 | 0 | $name ||= $self->name_unique_constraint($cols) |
1349 | 27003 | 3 | 0 | $_ =~ /^foreign\./ or $self->throw_exception("Malformed relationship condition key '${_}': must be prefixed with 'foreign.'") |
1352 | 26999 | 4 | 0 | $_ =~ /^self\./ or $self->throw_exception("Malformed relationship condition value '${_}': must be prefixed with 'self.'") |
1563 | 51 | 77 | 0 | $cols || () |
1585 | 2983 | 231 | 0 | $args->{'columns_info'} ||= $self->columns_info |
1594 | 2803 | 1 | 1405 | not exists $vals->{$col} or ($vals->{$col} || '') eq \'1 = 0' |
1673 | 67 | 135 | 54 | $force_left ||= lc($rel_info->{'attrs'}{'join_type'} || '') eq 'left' |
1718 | 0 | 664 | 513 | !$rel_info->{'attrs'}{'accessor'} || &first(sub { $rel_info->{'attrs'}{'accessor'} eq $_; } , 'single', 'filter') |
1754 | 0 | 0 | 194 | defined $$rel_data{$keyhash->{$p}} or $rel_source->column_info($keyhash->{$p})->{'is_auto_increment'} |
1832 | 2903 | 0 | 1254 | $rc->{'join_free_condition'} || $rc->{'condition'} |
1885 | 0 | 0 | 17934 | not defined $args->{$_} or length ref $args->{$_} |
1909 | 0 | 1249 | 4729 | $args->{'require_join_free_condition'} ||= !!$args->{'infer_values_based_on'} |
1911 | 4193 | 1785 | 0 | $args->{'condition'} ||= $rel_info->{'cond'} |
1926 | 0 | 603 | 0 | $rel_rsrc ||= $self->related_source($args->{'rel_name'}) |
1928 | 2 | 7 | 0 | not defined $args->{'foreign_values'} or ref $args->{'foreign_values'} eq 'HASH' |
1946 | 7 | 0 | 3 | exists $ci->{$_} or exists $ri->{$_} |
3 | 0 | 0 | exists $ci->{$_} or exists $ri->{$_} or $self->throw_exception("Key '${_}' supplied as 'foreign_values' is not a column on related source '@{[$rel_rsrc->source_name];}'") | |
1990 | 3 | 19 | 0 | $rel_rsrc ||= $self->related_source($args->{'rel_name'}) |
2016 | 36 | 0 | 0 | exists $fq_col_list->{$_} or $self->throw_exception("The join-free condition returned for $exception_rel_id may only " . 'contain keys that are fully qualified column names of the corresponding source ' . "(it returned '${_}')") |
2123 | 1 | 0 | 1243 | !$ret->{'join_free_condition'} || $ret->{'join_free_condition'} eq \'1 = 0' |
2180 | 23 | 199 | 0 | $rel_rsrc ||= $self->related_source($args->{'rel_name'}) |
2187 | 2 | 220 | 0 | $colinfos ||= $storage->_resolve_column_info([{-'alias', $args->{'self_alias'}, -'rsrc', $self}, {-'alias', $args->{'foreign_alias'}, -'rsrc', $rel_rsrc}]) |
2318 | 0 | 0 | 123203 | $global_phase_destroy ||= &in_global_destruction() |
2335 | 86077 | 18451 | 18675 | not ref $_[0]{'schema'} or &isweak($_[0]{'schema'}) |
line | l&&r | l&&!r | !l&&r | !l&&!r | condition |
---|---|---|---|---|---|
2110 | 10 | 0 | 0 | 7 | $ret->{'join_free_condition'} xor $subcond->{'join_free_condition'} |