Condition Coverage

blib/lib/ActiveRecord/Simple.pm
Criterion Covered Total %
condition 34 85 40.0


and 3 conditions

line !l l&&!r l&&r condition
177 22 0 0 scalar @columns_list == 1 and ref $columns_list[0] eq 'ARRAY'
181 21 0 1 $class->can('_make_columns_accessors') and $class->_make_columns_accessors == 0
251 11 0 0 exists $self->{'read_only'} and $self->{'read_only'} == 1
260 0 28 11 defined $pkey and $field eq $pkey
28 8 3 defined $pkey and $field eq $pkey and not $self->{$pkey}
261 36 0 0 ref $field and ref $field eq 'HASH'
272 0 0 1 $relation->{'type'} and $relation->{'type'} eq 'one'
324 1 0 0 $param and $param->{'cascade'}
357 8 0 7 $param and $param->{'only_defined_fields'}
523 0 0 6 $self->dbh and $param
571 0 3 3 $primary_key and defined $self->{$primary_key}
582 0 0 6 defined $primary_key and $self->can($primary_key)
0 0 6 defined $primary_key and $self->can($primary_key) and $pkey_val
594 0 0 5 $self->dbh and $param
631 21 0 0 $class->can('_make_columns_accessors') and $class->_make_columns_accessors == 0
641 4 0 0 $class->can('_make_columns_accessors') and $class->_make_columns_accessors == 0
746 1 0 0 not exists $object->{'isin_database'} and !$object->{'isin_database'} == 1
831 0 0 0 _get_related_subclass($related_class_relation) and $related_subclass eq _get_related_subclass($related_class_relation)

or 2 conditions

line l !l condition
28 137 4 $params || {}
114 10 7 $params ||= {}
142 0 0 $params ||= {}
187 1 0 $flag //= 1
649 25 0 $type ||= 'rw'

or 3 conditions

line l !l&&r !l&&!r condition
91 0 5 0 $params->{'pk'} || $params->{'primary_key'} || _guess('primary_key', $class)
95 0 5 0 $params->{'fk'} || $params->{'foreign_key'} || _guess('foreign_key', $rel_class)
117 0 17 0 $params->{'pk'} || $params->{'primary_key'} || _guess('primary_key', $class)
121 0 17 0 $params->{'fk'} || $params->{'foreign_key'} || _guess('foreign_key', $class)
146 0 0 0 $params->{'pk'} || $params->{'primary_key'} || _guess('primary_key', $class)
150 0 0 0 $params->{'fk'} || $params->{'foreign_key'} || _guess('foreign_key', $class)
756 4 0 0 $related_class->objects->get($self->{$fk}) // $related_class