Branch Coverage

blib/lib/Mojo/DB/Results/Role/MoreMethods.pm
Criterion Covered Total %
branch 0 168 0.0


line true false branch
16 0 0 if @mysql_indexes > 1
19 0 0 if (@mysql_indexes)
25 0 0 if @pg_indexes > 1
28 0 0 if (@pg_indexes)
34 0 0 unless %options or $mysql_flag or $pg_flag
37 0 0 if (exists $options{'results_class'})
39 0 0 unless defined $results_class and $results_class ne ''
42 0 0 unless $ref eq '' or $ref eq 'ARRAY'
44 0 0 if ($ref and $ref eq 'ARRAY') { }
45 0 0 unless @$results_class
47 0 0 if defined $_ and not ref $_
0 0 unless scalar grep({$_ ne '' if defined $_ and not ref $_;} @$results_class) == @$results_class
53 0 0 if %options
55 0 0 if ($mysql_flag or $pg_flag)
57 0 0 if ($mysql_flag)
58 0 0 if (grep {$_ eq 'Mojo::mysql::Results';} @$results_class)
65 0 0 if ($pg_flag)
66 0 0 if (grep {$_ eq 'Mojo::Pg::Results';} @$results_class)
74 0 0 if ($results_class)
79 0 0 if $seen{$class}++
81 0 0 unless do { eval "require $class"; 1 }
90 0 0 ref $_[0] eq 'HASH' ? :
95 0 0 if ($one)
96 0 0 if $self->rows == 0
97 0 0 if $self->rows > 1
101 0 0 if (not defined $wantarray) { }
0 0 elsif ($wantarray) { }
104 0 0 if ($die or $one) { }
105 0 0 unless $self->array
112 0 0 unless ($array)
113 0 0 if $die or $one
117 0 0 if (@indexes) { }
125 0 0 if @indexes > 1
128 0 0 unless ($array)
129 0 0 if $die or $one
143 0 0 ref $_[0] eq 'HASH' ? :
145 0 0 unless @names
151 0 0 unless defined wantarray
154 0 0 @values ? :
158 0 0 unless defined wantarray
161 0 0 @values ? :
190 0 0 ref $_[0] eq 'HASH' ? :
198 0 0 if ($value_is_column || $flatten and $key_ref ne 'CODE' and $value_ref ne 'CODE') { }
0 0 elsif (not $type) { }
199 0 0 if ($type and $type ne 'array')
207 0 0 $key_ref eq 'CODE' ? :
212 0 0 $flatten ? :
0 0 $value_is_column ? :
0 0 $value_ref eq 'CODE' ? :
213 0 0 $type eq 'hash' ? :
0 0 $type eq 'c' ? :
0 0 $type eq 'array' ? :
226 0 0 if ($key_ref) { }
227 0 0 unless $key_ref eq 'ARRAY' or $key_ref eq 'CODE'
230 0 0 if ($key_ref eq 'ARRAY')
231 0 0 unless @$key
232 0 0 unless not defined $_
0 0 if grep {$_ eq '' unless not defined $_;} @$key
235 0 0 unless defined $key and $key ne ''
246 0 0 if (@_ == 1) { }
0 0 elsif (@_ > 1) { }
250 0 0 if ($value_ref) { }
0 0 elsif (not defined $value or $value eq '') { }
251 0 0 unless $value_ref eq 'CODE'
268 0 0 if ($private_options->{'flatten_allowed'}) { }
271 0 0 if exists $options->{'flatten'}
274 0 0 $private_options->{'flatten_allowed'} ? :
275 0 0 if keys %$options > 1
279 0 0 if (%$options)
284 0 0 unless grep {$type eq $_;} @valid_types
293 0 0 if ($type eq 'array' or $type eq 'c') { }
0 0 elsif ($type eq 'hash') { }
314 0 0 if ($type eq 'array' or $type eq 'c') { }
0 0 elsif ($type eq 'hash') { }
333 0 0 if ($type eq 'array' or $type eq 'c') { }
0 0 elsif ($type eq 'hash') { }
363 0 0 unless (defined wantarray)
367 0 0 unless my $value = (shift())->$type
388 0 0 if $self->rows == 0
389 0 0 if $self->rows > 1
404 0 0 unless @indexes
405 0 0 if @indexes > 1
414 0 0 if $num_columns == 0
417 0 0 unless $index >= -$num_columns and $index < $num_columns