Branch Coverage

blib/lib/REST/Neo4p/Query.pm
Criterion Covered Total %
branch 90 188 47.8


line true false branch
22 0 2 unless (defined $q_string and not ref $q_string)
25 0 2 unless (not defined $params or ref $params eq 'HASH')
30 1 1 $params ? :
46 0 10 if (@params)
47 0 0 ref $params[0] ? :
53 0 10 unless 'REST::Neo4p'->connected
56 0 10 if ($agent->batch_mode)
66 0 10 unless ($self->tmpf)
73 5 5 if (/cypher/)
81 5 0 if (/transaction/)
103 0 10 if (my $e = 'REST::Neo4p::Neo4jException'->caught) { }
0 10 elsif ($e = 'REST::Neo4p::Exception'->caught) { }
0 10 elsif ($e = 'Exception::Class'->caught) { }
105 0 0 if $e->can('error_list')
106 0 0 if $self->{'RaiseError'}
111 0 0 if $self->{'RaiseError'}
115 0 0 ref $e && $e->can('rethrow') ? :
117 10 0 if (not ref('REST::Neo4p'->agent) =~ /Neo4j::Driver/) { }
128 0 29 unless (defined $self->{'_iterator'})
172 0 0 unless $rec
178 0 0 unless ref($_[0]) =~ /Driver/
181 0 0 $as_object ? :
185 0 0 if (/Driver/)
188 0 0 if (/HASH/)
193 0 0 if (/ARRAY/)
203 0 0 if (my $e = 'Exception::Class'->caught)
204 0 0 if ($e =~ /j_parse|json/i) { }
207 0 0 if $self->{'RaiseError'}
215 0 0 if (@row == 1 and ref $row[0] eq 'ARRAY') { }
239 0 10 unless $res
240 1 9 unless $res->[0] =~ /QUERY|TXN/
242 4 5 if (/QUERY/)
244 0 2 unless $obj and $obj->[0] eq 'columns'
248 0 2 unless $obj->[0] eq 'data'
252 0 6 unless defined $self->tmpf
256 0 5 unless ($item)
261 0 5 if (ref $row) { }
267 5 0 if ($row eq 'PENDING') { }
268 4 1 if ($self->tmpf->read($buf, $BUFSIZE)) { }
282 2 3 if (my $e = 'Exception::Class'->caught)
283 2 0 if ($e =~ /j_parse|json/i) { }
286 2 0 if $self->{'RaiseError'}
299 5 0 if (/TXN/)
301 0 5 unless $obj and $obj->[0] eq 'commit'
303 0 5 unless $obj and $obj->[0] eq 'results'
308 0 33 unless defined $self->tmpf
310 0 33 unless ($item)
317 3 30 if ($item->[0] eq 'columns')
321 0 3 unless $item->[0] eq 'data'
323 30 3 if ($item->[0] eq 'data' and ref $item->[1])
326 30 3 if ($row_str) { }
328 24 6 if (ref $row and ref $row->[1]) { }
3 3 elsif (not defined $row) { }
336 3 0 if ($row->[1] eq 'PENDING') { }
349 0 3 if $item->[1] =~ /STREAM/
351 29 4 if $ret or $self->err and $self->errobj->isa('REST::Neo4p::TxQueryException')
352 3 1 if ($item and $item->[0] eq 'transaction')
355 3 1 if ($item and $item->[0] eq 'errors')
360 135 4 if (ref $err) { }
4 0 elsif ($err eq 'PENDING') { }
371 2 1 if @error_list
376 2 1 if $e
379 2 31 if (my $e = 'Exception::Class'->caught)
380 2 0 if (ref $e) { }
0 0 elsif ($e =~ /j_parse|json/i) { }
382 0 2 if $self->{'RaiseError'}
387 0 0 if $self->{'RaiseError'}
403 0 10 if (my $e = 'Exception::Class'->caught('REST::Neo4p::LocalException')) { }
5 5 elsif ($e = 'Exception::Class'->caught) { }
405 0 0 if $self->{'RaiseError'}
409 0 5 if (ref $e) { }
413 5 0 if ($e =~ /j_parse|json/i) { }
416 5 0 if $self->{'RaiseError'}
427 0 75 if (ref $resp eq '') { }
0 75 elsif ($meta) { }
3 72 elsif (defined $resp->{'self'}) { }
0 72 elsif (defined $resp->{'start'} and defined $resp->{'end'} and defined $resp->{'nodes'}) { }
437 2 1 if (m[data/node])
440 1 0 if (m[data/relationship])
463 0 75 if ($meta)
467 0 75 unless (ref $_)
471 75 0 if (ref($_) =~ /HASH/)
474 0 75 if ($info and $info->{'type'}) { }
484 0 75 if ($e = 'Exception::Class'->caught)
485 0 0 ref $e && $e->can('rethrow') ? :
489 75 0 $self->{'ResponseAsObjects'} ? :
493 0 0 if (ref($_) =~ /ARRAY/)
498 0 0 if ($info and $info->{'type'}) { }
508 0 0 if ($e = 'Exception::Class'->caught)
509 0 0 ref $e && $e->can('rethrow') ? :
511 0 0 if ($entity_type eq 'bareword') { }
517 0 0 $self->{'ResponseAsObjects'} ? :
533 0 25 @ret == 1 && ref $ret[0] eq 'ARRAY' ? :
539 0 1 if $self->tmpf