Branch Coverage

blib/lib/Yancy/Backend/Memory.pm
Criterion Covered Total %
branch 90 100 90.0


line true false branch
28 83 1 if ($url)
30 0 83 if ($path)
40 51 3133 if ($schema)
59 5 108 ref $id_field eq 'ARRAY' ? :
64 55 63 if (not $params->{$id_field} and $self->schema->{$schema_name}{'properties'}{$id_field}{'type'} eq 'integer') { }
46 17 elsif ($params->{$id_field} and $id_field ne 'id' and exists $self->schema->{$schema_name}{'properties'}{'id'}) { }
84 5 108 @id_fields > 1 ? :
93 13 314 ref $id_field eq 'ARRAY' ? :
94 1 11 if @ids > 1 and !ref($id) || keys %$id < @ids
98 3 333 unless defined $id
103 3 277 if (my $join = $opt{'join'})
115 7 12 ref $join eq 'ARRAY' ? :
117 21 5 if (my $join_prop = $schema->{'properties'}{$join}) { }
5 0 elsif (my $join_schema = $self->schema->{$join}) { }
123 2 5 unless (match({$k, $where->{$key}}, $item->{$join}))
133 0 5 ref $id_field eq 'ARRAY' ? :
141 1 4 if $res->{'total'} < $min_items
155 1 625 unless $schema->{'properties'}
156 12 614 if ($join)
157 4 8 ref $join eq 'ARRAY' ? :
165 152 175 @opt % 2 == 0 ? :
167 0 327 unless $schema
171 8 319 ref $id_field eq 'ARRAY' ? :
180 6 321 if ($opt->{'join'})
184 1 326 ref $params eq 'ARRAY' ? :
196 130 197 $opt->{'limit'} ? :
197 57 270 if ($last > $#$matched_rows)
213 4 54 ref $id_field eq 'ARRAY' ? :
214 2 2 if @id_fields > 1 and !ref($id) || keys %$id < @id_fields
218 4 54 ref $id eq 'HASH' ? :
219 34 24 unless ($params->{$id_field})
229 2 0 ref $id eq 'HASH' ? :
230 0 2 unless $store->{$id_part}
236 2 54 ref $id eq 'HASH' ? :
237 10 46 unless $store->{$id_part}
248 0 94 unless $id
250 4 90 ref $id_field eq 'ARRAY' ? :
251 2 2 if @id_fields > 1 and !ref($id) || keys %$id < @id_fields
255 2 0 ref $id eq 'HASH' ? :
258 2 90 ref $id eq 'HASH' ? :
259 22 70 unless $store->{$id_part}
265 0 169 unless $data
269 216 819 unless defined $data->{$key}
271 56 763 if (is_type($type, 'boolean')) { }
70 800 elsif (is_type($type, 'string') and is_format($format, 'date-time')) { }
274 24 32 $data->{$key} && !($data->{$key} =~ /^false$/iu) ? :
278 57 13 if ($data->{$key} eq "now")
291 104 0 %Local::Test::SCHEMA ? :
299 399 2491 if ($p->{'format'} and not $db_formats{$p->{'format'}})
304 7 97 @table_names ? :