| line |
true |
false |
branch |
|
238
|
2 |
107 |
unless $doc and ref $doc and ref $doc eq "HASH"
|
|
240
|
2 |
104 |
if $query and !ref($query) || ref $query ne 'HASH'
|
|
242
|
0 |
19 |
if $defs and !ref($defs) || ref $defs ne 'ARRAY' || scalar @$defs % 2 != 0
|
|
248
|
19 |
86 |
if ($defs)
|
|
258
|
12 |
109 |
if ($key eq '$or' and ref $value eq 'ARRAY') { }
|
|
|
3 |
106 |
elsif ($key eq '$and' and ref $value eq 'ARRAY') { }
|
|
261
|
0 |
20 |
unless ref $_ eq "HASH"
|
|
265
|
12 |
9 |
unless (&_attribute_matches($doc, $k, $v))
|
|
271
|
8 |
12 |
if ($ok)
|
|
276
|
4 |
8 |
unless $found
|
|
279
|
1 |
5 |
unless &doc_matches($doc, $_, $defs)
|
|
282
|
26 |
80 |
unless &_attribute_matches($doc, $key, $value)
|
|
308
|
17 |
110 |
if ($key =~ /\./) { }
|
|
314
|
13 |
4 |
if defined $v
|
|
318
|
104 |
6 |
if exists $doc->{$key}
|
|
321
|
31 |
96 |
if (not ref $value) { }
|
|
|
0 |
96 |
elsif (builtin::blessed($value) and builtin::blessed($value) eq 'MongoDB::OID' || builtin::blessed($value) eq 'MorboDB::OID') { }
|
|
|
2 |
94 |
elsif (ref $value eq 'Regexp') { }
|
|
|
93 |
1 |
elsif (ref $value eq 'HASH') { }
|
|
|
1 |
0 |
elsif (ref $value eq 'ARRAY') { }
|
|
324
|
2 |
29 |
unless defined $virt{$key}
|
|
325
|
0 |
29 |
if (ref $virt{$key} eq 'ARRAY') { }
|
|
|
29 |
0 |
elsif (not ref $virt{$key}) { }
|
|
327
|
0 |
0 |
unless &_array_has_eq($value, $virt{$key})
|
|
329
|
9 |
20 |
unless $virt{$key} eq $value
|
|
341
|
0 |
0 |
unless defined $virt{$key}
|
|
342
|
0 |
0 |
if (builtin::blessed($virt{$key}) and builtin::blessed($virt{$key}) eq 'MongoDB::OID' || builtin::blessed($virt{$key}) eq 'MorboDB::OID') { }
|
|
348
|
0 |
0 |
unless $virt{$key}->value eq $value->value
|
|
357
|
0 |
2 |
unless defined $virt{$key}
|
|
358
|
0 |
2 |
if (ref $virt{$key} eq 'ARRAY') { }
|
|
|
2 |
0 |
elsif (not ref $virt{$key}) { }
|
|
359
|
0 |
0 |
unless &_array_has_re($value, $virt{$key})
|
|
361
|
1 |
1 |
unless $virt{$key} =~ /$value/
|
|
369
|
91 |
2 |
if (&_has_adv_que($value)) { }
|
|
375
|
0 |
2 |
unless Compare($value, $virt{$key})
|
|
384
|
38 |
61 |
if ($q eq '$gt' or $q eq '$gte' or $q eq '$lt' or $q eq '$lte' or $q eq '$eq' or $q eq '$ne') { }
|
|
|
15 |
46 |
elsif ($q eq '$exists') { }
|
|
|
4 |
42 |
elsif ($q eq '$mod' and ref $term eq 'ARRAY' and scalar @$term == 2) { }
|
|
|
4 |
38 |
elsif ($q eq '$in' and ref $term eq 'ARRAY') { }
|
|
|
3 |
35 |
elsif ($q eq '$nin' and ref $term eq 'ARRAY') { }
|
|
|
4 |
31 |
elsif ($q eq '$size' and &is_int($term)) { }
|
|
|
3 |
28 |
elsif ($q eq '$all' and ref $term eq 'ARRAY') { }
|
|
|
28 |
0 |
elsif ($q eq '$type' and not ref $term) { }
|
|
391
|
0 |
38 |
unless defined $virt{$key} and not ref $virt{$key}
|
|
393
|
14 |
24 |
if ($q eq '$gt') { }
|
|
|
8 |
16 |
elsif ($q eq '$gte') { }
|
|
|
7 |
9 |
elsif ($q eq '$lt') { }
|
|
|
5 |
4 |
elsif ($q eq '$lte') { }
|
|
|
1 |
3 |
elsif ($q eq '$eq') { }
|
|
|
3 |
0 |
elsif ($q eq '$ne') { }
|
|
394
|
14 |
0 |
if (&is_float(scalar($virt{$key} && &is_float($term)))) { }
|
|
395
|
7 |
7 |
unless $virt{$key} > $term
|
|
397
|
0 |
0 |
unless $virt{$key} gt $term
|
|
400
|
8 |
0 |
if (&is_float(scalar($virt{$key} && &is_float($term)))) { }
|
|
401
|
1 |
7 |
unless $virt{$key} >= $term
|
|
403
|
0 |
0 |
unless $virt{$key} ge $term
|
|
406
|
6 |
1 |
if (&is_float($virt{$key}) and &is_float($term)) { }
|
|
407
|
1 |
5 |
unless $virt{$key} < $term
|
|
409
|
0 |
1 |
unless $virt{$key} lt $term
|
|
412
|
5 |
0 |
if (&is_float($virt{$key}) and &is_float($term)) { }
|
|
413
|
1 |
4 |
unless $virt{$key} <= $term
|
|
415
|
0 |
0 |
unless $virt{$key} le $term
|
|
418
|
0 |
1 |
if (&is_float($virt{$key}) and &is_float($term)) { }
|
|
419
|
0 |
0 |
unless $virt{$key} == $term
|
|
421
|
0 |
1 |
unless $virt{$key} eq $term
|
|
424
|
1 |
2 |
if (&is_float($virt{$key}) and &is_float($term)) { }
|
|
425
|
0 |
1 |
unless $virt{$key} != $term
|
|
427
|
0 |
2 |
unless $virt{$key} ne $term
|
|
431
|
10 |
5 |
if ($term) { }
|
|
432
|
5 |
5 |
unless exists $virt{$key}
|
|
434
|
1 |
4 |
if exists $virt{$key}
|
|
443
|
1 |
3 |
unless defined $virt{$key} and &is_float($virt{$key}) and $virt{$key} % $term->[0] == $term->[1]
|
|
447
|
1 |
3 |
unless defined $virt{$key} and &_value_in($virt{$key}, $term)
|
|
451
|
1 |
2 |
unless defined $virt{$key} and not &_value_in($virt{$key}, $term)
|
|
461
|
1 |
1 |
unless defined $virt{$key} and ref $virt{$key} eq 'ARRAY' && scalar @{$virt{$key};} == $term || ref $virt{$key} eq 'HASH' && scalar keys %{$virt{$key};} == $term
|
|
465
|
0 |
3 |
unless defined $virt{$key} and ref $virt{$key} eq "ARRAY"
|
|
467
|
1 |
5 |
unless &_value_in($_, $virt{$key})
|
|
470
|
3 |
25 |
if ($term eq 'int') { }
|
|
|
4 |
21 |
elsif ($term eq 'float') { }
|
|
|
2 |
19 |
elsif ($term eq 'real') { }
|
|
|
2 |
17 |
elsif ($term eq 'whole') { }
|
|
|
2 |
15 |
elsif ($term eq 'string') { }
|
|
|
2 |
13 |
elsif ($term eq 'array') { }
|
|
|
5 |
8 |
elsif ($term eq 'hash') { }
|
|
|
1 |
7 |
elsif ($term eq 'bool') { }
|
|
|
3 |
4 |
elsif ($term eq 'date') { }
|
|
|
3 |
1 |
elsif ($term eq 'null') { }
|
|
|
1 |
0 |
elsif ($term eq 'regex') { }
|
|
472
|
1 |
2 |
unless defined $virt{$key} and &is_int($virt{$key})
|
|
475
|
0 |
4 |
unless defined $virt{$key} and &is_float($virt{$key})
|
|
478
|
0 |
2 |
unless defined $virt{$key} and &is_real($virt{$key})
|
|
481
|
1 |
1 |
unless defined $virt{$key} and &is_whole($virt{$key})
|
|
485
|
0 |
2 |
unless defined $virt{$key} and &is_string($virt{$key})
|
|
489
|
0 |
2 |
unless defined $virt{$key} and ref $virt{$key} eq "ARRAY"
|
|
493
|
1 |
4 |
unless defined $virt{$key} and ref $virt{$key} eq "HASH"
|
|
498
|
0 |
3 |
unless defined $virt{$key} and not ref $virt{$key}
|
|
506
|
1 |
2 |
unless builtin::blessed($date) and builtin::blessed($date) eq "DateTime"
|
|
509
|
1 |
2 |
unless exists $virt{$key} and not defined $virt{$key}
|
|
513
|
0 |
1 |
unless defined $virt{$key} and ref $virt{$key} eq "Regexp"
|
|
519
|
0 |
1 |
unless Compare($value, $virt{$key})
|
|
539
|
0 |
0 |
if $_ eq $value
|
|
559
|
0 |
0 |
if /$re/
|
|
582
|
91 |
599 |
if exists $hash->{$_}
|
|
602
|
0 |
46 |
if &is_float($_) and not &is_float($value)
|
|
603
|
0 |
46 |
if not &is_float($_) and &is_float($value)
|
|
604
|
0 |
46 |
if &is_float($_) and $value == $_
|
|
605
|
9 |
37 |
if not &is_float($_) and $value eq $_
|
|
628
|
2 |
17 |
unless defined $doc and ref $doc and ref $doc eq "HASH"
|
|
630
|
1 |
15 |
unless defined $obj and ref $obj and ref $obj eq "HASH"
|
|
636
|
14 |
1 |
if (&_has_adv_upd($obj)) { }
|
|
638
|
2 |
16 |
if ($op eq '$inc') { }
|
|
|
2 |
14 |
elsif ($op eq '$set') { }
|
|
|
2 |
12 |
elsif ($op eq '$unset') { }
|
|
|
1 |
11 |
elsif ($op eq '$rename') { }
|
|
|
1 |
10 |
elsif ($op eq '$push') { }
|
|
|
1 |
9 |
elsif ($op eq '$pushAll') { }
|
|
|
2 |
7 |
elsif ($op eq '$addToSet') { }
|
|
|
2 |
5 |
elsif ($op eq '$pop') { }
|
|
|
1 |
4 |
elsif ($op eq '$shift') { }
|
|
|
1 |
3 |
elsif ($op eq '$splice') { }
|
|
|
2 |
1 |
elsif ($op eq '$pull') { }
|
|
|
1 |
0 |
elsif ($op eq '$pullAll') { }
|
|
641
|
0 |
2 |
unless ref $obj->{$op} eq "HASH"
|
|
649
|
0 |
2 |
unless ref $obj->{$op} eq "HASH"
|
|
656
|
0 |
2 |
unless ref $obj->{$op} eq "HASH"
|
|
658
|
2 |
0 |
if $obj->{$op}{$field}
|
|
663
|
0 |
1 |
unless ref $obj->{$op} eq "HASH"
|
|
666
|
1 |
0 |
if exists $doc->{$field}
|
|
671
|
0 |
1 |
unless ref $obj->{$op} eq "HASH"
|
|
675
|
0 |
1 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
682
|
0 |
1 |
unless ref $obj->{$op} eq "HASH"
|
|
686
|
0 |
1 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
693
|
0 |
2 |
unless ref $obj->{$op} eq "HASH"
|
|
697
|
0 |
2 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
703
|
1 |
1 |
ref $obj->{$op}{$field} && ref $obj->{$op}{$field} eq 'ARRAY' ? :
|
|
706
|
2 |
2 |
unless defined &_index_of($val, $doc->{$field})
|
|
712
|
0 |
2 |
unless ref $obj->{$op} eq "HASH"
|
|
716
|
0 |
2 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
719
|
2 |
0 |
if $obj->{$op}{$field}
|
|
724
|
0 |
1 |
unless ref $obj->{$op} eq "HASH"
|
|
728
|
0 |
1 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
731
|
1 |
0 |
if $obj->{$op}{$field}
|
|
736
|
0 |
1 |
unless ref $obj->{$op} eq "HASH"
|
|
740
|
0 |
1 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
744
|
0 |
1 |
unless ref $obj->{$op}{$field} and ref $obj->{$op}{$field} eq "ARRAY" and scalar @{$obj->{$op}{$field};} == 2
|
|
755
|
0 |
2 |
unless ref $obj->{$op} eq "HASH"
|
|
759
|
0 |
2 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
771
|
0 |
1 |
unless ref $obj->{$op} eq "HASH"
|
|
775
|
0 |
1 |
if defined $doc->{$field} and ref $doc->{$field} ne "ARRAY"
|
|
814
|
14 |
84 |
if exists $hash->{$_}
|
|
835
|
0 |
22 |
if (&is_float($array->[$i]) and &is_float($value)) { }
|
|
836
|
0 |
0 |
if $array->[$i] == $value
|
|
838
|
6 |
16 |
if $array->[$i] eq $value
|
|
863
|
0 |
23 |
unless exists $BUILTINS{$func}
|
|
866
|
4 |
19 |
unless ref $def->{$func}
|
|
871
|
49 |
4 |
if defined $v
|
|
875
|
2 |
21 |
unless scalar @vals
|
|
895
|
42 |
28 |
unless $key =~ /\./
|
|
907
|
35 |
15 |
if ($have and ref $have eq 'HASH' and exists $have->{$key}) { }
|
|
|
10 |
5 |
elsif ($have and ref $have eq 'ARRAY' and $key =~ /^\d+$/ and scalar @$have > $key) { }
|