Branch Coverage

blib/lib/Catmandu/Store/MongoDB/CQL.pm
Criterion Covered Total %
branch 75 96 78.1


line true false branch
25 0 29 unless (my $node = eval { do { $self->parser->parse($query) } })
32 0 27 if ($self->log->is_debug)
45 45 0 $self->mapping ? :
47 0 45 unless $indexes
49 37 8 if ($node->isa('CQL::TermNode')) { }
0 8 elsif ($node->isa('CQL::ProxNode')) { }
8 0 elsif ($node->isa('CQL::BooleanNode')) { }
52 0 37 if ($term =~ /$match_all/)
63 2 35 if ($base eq 'scr')
64 2 0 if ($self->mapping and $self->mapping->{'default_relation'}) { }
73 2 35 if ($qualifier =~ /$any_field/) { }
76 2 0 if ($self->mapping and $self->mapping->{'default_index'}) { }
89 0 35 if $self->mapping and $self->mapping->{'strip_separating_underscores'}
90 1 34 unless my $q_mapping = $indexes->{$search_field}
92 1 33 unless $q_mapping->{'op'}{$base}
97 1 32 if (ref $op and $op->{'field'}) { }
3 29 elsif ($q_mapping->{'field'}) { }
106 1 32 if (ref $op and $op->{'filter'}) { }
1 31 elsif ($q_mapping->{'filter'}) { }
113 2 31 if ($filters)
115 2 0 if ($filter eq 'lowercase')
122 1 32 if (ref $op and $op->{'cb'}) { }
1 31 elsif ($q_mapping->{'cb'}) { }
137 10 25 if $term =~ /^[1-9]\d*$/
139 12 23 if ($base eq '=' or $base eq 'scr') { }
1 22 elsif ($base eq '<') { }
1 21 elsif ($base eq '>') { }
1 20 elsif ($base eq '<=') { }
1 19 elsif ($base eq '>=') { }
2 17 elsif ($base eq '<>') { }
10 7 elsif ($base eq 'exact') { }
3 4 elsif ($base eq 'all') { }
3 1 elsif ($base eq 'any') { }
1 0 elsif ($base eq 'within') { }
140 12 0 unless ($unmasked)
141 0 12 _is_wildcard($term) ? :
173 3 6 if ($unmasked) { }
2 4 elsif (_is_wildcard($term)) { }
204 3 6 if ($unmasked) { }
2 4 elsif (_is_wildcard($term)) { }
230 0 1 if (@range == 1) { }
243 0 0 unless ($unmasked)
244 0 0 _is_wildcard($term) ? :
265 4 4 if ($op eq '$and' or $op eq '$or') { }
4 0 elsif ($op eq '$not') { }
271 1 3 if ($k eq '$or') { }
1 2 elsif ($k eq '$and') { }
289 20 0 unless index($value, '^') == 0 or rindex($value, '^') == length($value) - 1 or index($value, '*') >= 0