Condition Coverage

blib/lib/Rose/DB/Object/Manager.pm
Criterion Covered Total %
condition 10 536 1.8


and 2 conditions

line l !l condition
1962 0 0 $num_with_objects && scalar @{[@has_dups[1 .. $num_with_objects]];}

and 3 conditions

line !l l&&!r l&&r condition
128 62 0 0 @_ == 1 and ref $_[0] eq 'ARRAY'
173 1 0 0 not $object_class and UNIVERSAL::isa($target_class, 'Rose::DB::Object')
240 0 1 0 ref $types and ref $types ne 'ARRAY'
243 1 0 0 $have_full_name and ref $types
1 0 0 $have_full_name and ref $types and @$types > 1
423 0 0 0 $args{'where'} and not exists $args{'query'}
438 0 0 0 ref $with_objects and not @$with_objects
439 0 0 0 ref $require_objects and not @$require_objects
479 0 0 0 $dbh->{'Driver'}{'Name'} eq 'Pg' and index($dbh->{'Driver'}{'Version'}, '2.0.') == 0
508 0 0 0 $with_objects && !$require_objects
513 0 0 0 $with_objects and not ref $with_objects
514 0 0 0 $require_objects and not ref $require_objects
538 0 0 0 not $in_require and $i++ == $requires_start
551 0 0 0 $join_type{$arg} and $join_type{$arg} ne $join_type
563 0 0 0 $join_type{$arg} and $join_type{$arg} ne $join_type
576 0 0 0 $join_type{$clean_arg} and $join_type{$clean_arg} ne $join_type
780 0 0 0 $fetch and ref $distinct
828 0 0 0 $num_subtables == 0 and defined $table_aliases
0 0 0 $num_subtables == 0 and defined $table_aliases and $table_aliases == 0
854 0 0 0 $args{'limit'} || $args{'offset'} and $dbh->{'Driver'}{'Name'} eq 'Oracle'
931 0 0 0 $try_subselect_limit and $db->supports_select_from_subselect
0 0 0 $try_subselect_limit and $db->supports_select_from_subselect and !$args{'offset'} || $db->supports_limit_with_offset
0 0 0 $try_subselect_limit and $db->supports_select_from_subselect and !$args{'offset'} || $db->supports_limit_with_offset and not $args{'select'}
935 0 0 0 $fetch and @$fetch
0 0 0 $fetch and @$fetch and $fetch->[0] eq 't1'
1027 0 0 0 not $ft_columns and $rel_type ne 'one to many'
1032 0 0 0 $rel->can('query_args') and my $query_args = $rel->query_args
1104 0 0 0 $ft_columns and %$ft_columns
1122 0 0 0 $rel_type eq 'foreign key' && $rel->is_required && $rel->referential_integrity && $nested_joins
0 0 0 not $rel_type eq 'foreign key' && $rel->is_required && $rel->referential_integrity && $nested_joins and $outer_joins || $with_objects{$arg}
1189 0 0 0 $joins[$i] and $joins[$i]{'type'} eq 'JOIN'
1192 0 0 0 $rel->can('join_args') and my $join_args = $rel->join_args
1229 0 0 0 $rel->can('manager_args') and my $mgr_args = $rel->manager_args
1232 0 0 0 $mgr_args->{'sort_by'} and !%fetch || $fetch{$tables[-1]} && !$fetch{$rel_names[-1]}
1277 0 0 0 $with_map_records && exists $with_map_records->{$name}
1333 0 0 0 $direct_inject and my $map_record_key = $ft_class->meta->map_record_method_key($map_record_method)
1344 0 0 0 $direct_inject and $mapped_object_methods[$i - 1]
1390 0 0 0 $joins[$i] and $joins[$i]{'type'} eq 'JOIN'
1497 0 0 0 $joins[$i] and $joins[$i]{'type'} eq 'JOIN'
1500 0 0 0 $rel->can('manager_args') and my $mgr_args = $rel->manager_args
1503 0 0 0 $mgr_args->{'sort_by'} and !%fetch || $fetch{$tables[-1]} && !$fetch{$rel_names[-1]}
1572 0 0 0 index($item, '.') < 0 and not $item =~ /\s+ AS \s+ \w+ \s* \Z/xi
1599 0 0 0 $meta->column($column) and my $alias = $meta->column($column)->alias
1655 0 0 0 not $use_distinct and $require_objects
1777 0 0 0 $num_to_many_rels > 0 and !%fetch || (keys %fetch || 0) > 3
0 0 0 $num_to_many_rels > 0 and !%fetch || (keys %fetch || 0) > 3 and not $no_forced_sort
1815 0 0 0 $num_to_many_rels > 0 and !%fetch || (keys %fetch || 0) > 3
0 0 0 $num_to_many_rels > 0 and !%fetch || (keys %fetch || 0) > 3 and not $no_forced_sort
1821 0 0 0 not ref $sort and $sort =~ /^t1\./
1863 0 0 0 $db->supports_limit_with_offset and not $manual_limit
0 0 0 $db->supports_limit_with_offset and not $manual_limit and not $subselect_limit
1917 0 0 0 $args{'sort_by'} and $num_subtables > 0
2235 0 0 0 defined $mapped_object_method and not $mapped_object_method
2294 0 0 0 $has_dups[$i] and my $bt = $belongs_to[$i]
2301 0 0 0 $multi_many and ref $parent_object eq 'ARRAY'
0 0 0 $multi_many and ref $parent_object eq 'ARRAY' and @$parent_object > 1
2403 0 0 0 $manual_limit and $self->{'_count'} == $manual_limit
2412 0 0 0 $last_object and not $object_is_ready
2467 0 0 0 $manual_limit and $self->{'_count'} == $manual_limit
2505 0 0 0 $skip_first and ++$count <= $skip_first
2619 0 0 0 $skip_first and ++$count <= $skip_first
2657 0 0 0 $db and $dbh_retained
2664 0 0 0 $db and $dbh_retained
2737 0 0 0 not $skip_first and $manual_limit
0 0 0 not $skip_first and $manual_limit and @objects == $manual_limit
2771 0 0 0 defined $mapped_object_method and not $mapped_object_method
2830 0 0 0 $has_dups[$i] and my $bt = $belongs_to[$i]
2837 0 0 0 $multi_many and ref $parent_object eq 'ARRAY'
0 0 0 $multi_many and ref $parent_object eq 'ARRAY' and @$parent_object > 1
2933 0 0 0 $last_object and not $skip_first
2958 0 0 0 $manual_limit and @objects >= $manual_limit
3181 0 0 0 $args{'query'} and @{$args{'query'};}
0 0 0 $args{'clauses'} and @{$args{'clauses'};}
3191 0 0 0 $args{'query'} and @{$args{'query'};}
0 0 0 $args{'query'} and @{$args{'query'};} and $args{'all'}
3289 0 0 0 $args{'where'} and @{$args{'where'};}
3296 0 0 0 $args{'where'} and @{$args{'where'};}
0 0 0 $args{'where'} and @{$args{'where'};} and $args{'all'}
3469 0 0 0 $args{'_methods'} && %{$args{'_methods'};}
3597 0 0 0 $args{'_methods'} && %{$args{'_methods'};}
3728 0 0 0 $db and $dbh_retained
3735 0 0 0 $db and $dbh_retained

or 2 conditions

line l !l condition
415 0 0 delete $args{'skip_first'} || 0
418 0 0 delete $args{'hints'} || {}
435 0 0 $args{'lock'}{'type'} ||= 'for update'
809 0 0 delete $args{'page'} || 1
1108 0 0 $join_type{$arg} || 'LEFT OUTER JOIN'
1112 0 0 $join_type{$arg} || 'JOIN'
1139 0 0 $join_type{$arg} || 'LEFT OUTER JOIN'
1175 0 0 $join_type{$arg} || 'JOIN'
1226 0 0 $joins[$i]{'conditions'} ||= ['1 = 1']
1269 0 0 $rel->manager_args || {}
1284 0 0 $with_map_records->{'__xrdbopriv_default_rel_key'} || 0
1324 0 0 $map_record_method || 0
1363 0 0 $join_type{$arg} || 'LEFT OUTER JOIN'
1376 0 0 $join_type{$arg} || 'JOIN'
1470 0 0 $join_type{$arg} || 'LEFT OUTER JOIN'
1483 0 0 $join_type{$arg} || 'JOIN'
1536 0 0 $rel_name{$tn} || ''
1621 0 0 $1 || 1
1660 0 0 $meta->foreign_key($name) || $meta->relationship($name) || (next)
2070 0 0 $db->driver || 'unknown'
3241 0 0 $sth->rows || 0
3378 0 0 $sth->rows || 0
3466 0 0 $args{'args'} || []
3594 0 0 $args{'args'} || []

or 3 conditions

line l !l&&r !l&&!r condition
64 0 0 0 $mode eq 'croak' or $mode eq 'fatal'
161 0 1 0 $args{'target_class'} || $calling_class
207 0 1 0 $args{'base_name'} || $cm->auto_manager_base_name($meta->table, $object_class)
255 0 0 0 $cm->auto_manager_method_name($type, $base_name, $object_class) || "get_$name"
280 0 1 0 $cm->auto_manager_method_name($type, $base_name, $object_class) || "get_${name}_count"
301 1 0 0 $cm->auto_manager_method_name($type, $base_name, $object_class) || "get_${name}_iterator"
322 1 0 0 $cm->auto_manager_method_name($type, $base_name, $object_class) || "delete_$name"
342 0 0 0 $cm->auto_manager_method_name($type, $base_name, $object_class) || "update_$name"
406 0 0 0 delete $args{'object_class'} || $class->object_class || Carp::croak('Missing object class argument')
455 0 0 0 $hints->{'t1'} || $$hints{$meta->table} || $hints
461 0 0 0 delete $args{'db'} || $object_class->init_db
548 0 0 0 $1 eq '!' || !$1 && $in_require
560 0 0 0 $1 eq '!' || !$1 && $in_require
571 0 0 0 $1 eq '!' || !$1 && $in_require
743 0 0 0 !ref($nonlazy) || $nonlazy{'self'}
778 0 0 0 $distinct or $fetch
790 0 0 0 ref $fetch or ref $distinct
800 0 0 0 exists $args{'page'} or exists $args{'per_page'}
802 0 0 0 exists $args{'limit'} or exists $args{'offset'}
810 0 0 0 delete $args{'per_page'} || $class->default_objects_per_page
854 0 0 0 $args{'limit'} || $args{'offset'}
892 0 0 0 $chase_meta->foreign_key($sub_name) || $chase_meta->relationship($sub_name) || Carp::confess('Invalid with_objects or require_objects argument: ', "no foreign key or relationship named '${sub_name}' ", 'found in ', $chase_meta->class)
904 0 0 0 $meta->foreign_key($name) || $meta->relationship($name) || Carp::confess('Invalid with_objects or require_objects argument: ', "no foreign key or relationship named '${name}' ", "found in $class")
931 0 0 0 !$args{'offset'} || $db->supports_limit_with_offset
1012 0 0 0 $parent_meta->foreign_key($name) || $parent_meta->relationship($name) || Carp::croak("No relationship named '${name}' in class ", $parent_meta->class)
1019 0 0 0 $rel_type eq 'foreign key' or $rel_type eq 'one to one'
0 0 0 $rel_type eq 'foreign key' or $rel_type eq 'one to one' or $rel_type eq 'many to one'
0 0 0 $rel_type eq 'foreign key' or $rel_type eq 'one to one' or $rel_type eq 'many to one' or $rel_type eq 'one to many'
1070 0 0 0 !ref($nonlazy) || $nonlazy{$name}
1088 0 0 0 $rel->method_name('get_set') || $rel->method_name('get_set_now') || $rel->method_name('get_set_on_save') || Carp::confess(q[No 'get_set', 'get_set_now', or 'get_set_on_save' ], "method found for $rel_type '${name}' in class ", $rel->parent->class)
1122 0 0 0 $outer_joins || $with_objects{$arg}
1140 0 0 0 $$hints{"t$i"} || $hints->{$name}
1176 0 0 0 $$hints{"t$i"} || $hints->{$name}
1232 0 0 0 !%fetch || $fetch{$tables[-1]} && !$fetch{$rel_names[-1]}
1289 0 0 0 !ref($nonlazy) || $nonlazy{$name}
1355 0 0 0 $outer_joins or $with_objects{$arg}
1364 0 0 0 $$hints{"t$i"} || $hints->{$name}
1377 0 0 0 $$hints{"t$i"} || $hints->{$name}
1408 0 0 0 $map_meta->foreign_key($map_to) || $map_meta->relationship($map_to) || Carp::confess("No foreign key or relationship named '${map_to}' ", "found in $map_class")
1422 0 0 0 !ref($nonlazy) || $nonlazy{$name}
1444 0 0 0 $rel->method_name('get_set') || $rel->method_name('get_set_now') || $rel->method_name('get_set_on_save') || Carp::confess(q[No 'get_set', 'get_set_now', or 'get_set_on_save' ], "method found for relationship '${name}' in class ", "$class")
1462 0 0 0 $outer_joins or $with_objects{$arg}
1471 0 0 0 $$hints{"t$i"} || $hints->{$name}
1484 0 0 0 $$hints{"t$i"} || $hints->{$name}
1503 0 0 0 !%fetch || $fetch{$tables[-1]} && !$fetch{$rel_names[-1]}
1540 0 0 0 $fetch{$tn} or $fetch{$tables[$i]}
0 0 0 $fetch{$tn} or $fetch{$tables[$i]} or $fetch{$trimmed_table}
0 0 0 $fetch{$tn} or $fetch{$tables[$i]} or $fetch{$trimmed_table} or $fetch{$rel_names[$i]}
0 0 0 $fetch{$tn} or $fetch{$tables[$i]} or $fetch{$trimmed_table} or $fetch{$rel_names[$i]} or $fetch{$rel_name}
1588 0 0 0 $tn{$2} || $rel_tn{$2}
1653 0 0 0 delete $args{'distinct'} || $with_objects
1679 0 0 0 not $use_distinct or @$pk_columns == 1
0 0 0 not $use_distinct or @$pk_columns == 1 or $db->supports_multi_column_count_distinct
1777 0 0 0 !%fetch || (keys %fetch || 0) > 3
1798 0 0 0 $sort =~ s/^(['"`]?)(\w+)\1(\s+(?:ASC|DESC))?$/t1.$1$2$1$3/i or $sort =~ s/\b$table_unquoted\./t$i./g
1815 0 0 0 !%fetch || (keys %fetch || 0) > 3
1861 0 0 0 $args{'limit'} or $manual_limit
1946 0 0 0 $sub_args{'with_objects'} && (!ref($sub_args{'with_objects'}) || @{$sub_args{'with_objects'};}) || $sub_args{'require_objects'} && (!ref($sub_args{'require_objects'}) || @{$sub_args{'require_objects'};})
2041 0 0 0 $column ||= $item
2047 0 0 0 $column ||= $2
2053 0 0 0 $column ||= $4
2054 0 0 0 $tn{$table} || $rel_tn{$table}
2060 0 0 0 $column ||= $item
2228 0 0 0 $object ||= $last_object
2764 0 0 0 $object ||= $last_object
3153 0 0 0 $args{'object_class'} || $class->object_class
3162 0 0 0 $args{'db'} ||= $object_class->init_db
3181 0 0 0 $args{'query'} and @{$args{'query'};} or $args{'clauses'} and @{$args{'clauses'};}
0 0 0 $args{'query'} and @{$args{'query'};} or $args{'clauses'} and @{$args{'clauses'};} or delete $args{'all'}
3263 0 0 0 $args{'object_class'} || $class->object_class
3272 0 0 0 $args{'db'} ||= $object_class->init_db
3289 0 0 0 $args{'where'} and @{$args{'where'};} or delete $args{'all'}
3455 0 0 0 $args{'object_class'} || $class->object_class || Carp::croak('Missing object class')
3471 0 0 0 delete $args{'db'} || $object_class->init_db
3542 0 0 0 $methods->{$col} || $col
3583 0 0 0 $args{'object_class'} || $class->object_class || Carp::croak('Missing object class')
3586 0 0 0 (my $meta = $object_class->meta) || Carp::croak("Could not get meta for $object_class")
3599 0 0 0 delete $args{'db'} || $object_class->init_db
3747 0 0 0 $class->object_class || $class->_object_class
3763 0 0 0 $class->object_class || $class->_object_class