Branch Coverage

blib/lib/Metabase/Index/SQL.pm
Criterion Covered Total %
branch 41 56 73.2


line true false branch
123 142 0 if $pk->can($k)
138 0 70 unless try_load_class($c)
141 1 69 unless $types and keys %$types
158 0 139 unless try_load_class($r)
164 0 139 unless keys %$types
222 68 431 if $f =~ qr/^content\./
223 68 431 if $f =~ qr/^resource\./
224 17 482 unless $f =~ qr/^(?:core|content|resource)\./
227 0 465 if ($saw_content_field and not $self->_requested_content_type)
230 0 465 if ($saw_resource_field and not $self->_requested_resource_type)
236 0 465 unless $self->_check_query_fields($self->_core_table, 'core')
238 153 312 if (my $content_type = $self->_requested_content_type)
240 0 153 unless $self->_check_query_fields($content_table, 'content')
243 34 431 if (my $resource_type = $self->_requested_resource_type)
245 0 34 unless $self->_check_query_fields($resource_table, 'resource')
257 374 482 unless $f =~ /^$type\.(.+)$/
259 0 482 unless $table_obj->get_field($name)
267 0 16 unless $fact->guid
279 16 0 if (keys %$content_meta)
289 16 0 if (keys %$resource_meta)
310 0 255 unless $sql
323 1 18 unless $sql
340 48 160 if (defined $$spec{-'order'} and ref $$spec{-'order'} eq 'ARRAY') { }
358 16 192 unless $sql
372 0 4 unless $guid
425 309 187 if (defined $$spec{-'where'})
430 53 443 if (defined $$spec{-'order'} and ref $$spec{-'order'} eq 'ARRAY')
444 18 478 if ($limit = $$spec{-'limit'})