Branch Coverage

blib/lib/KiokuDB/Backend/DBI.pm
Criterion Covered Total %
branch 83 124 66.9


line true false branch
63 0 62 if @args == 1 and ref $args[0] eq 'HASH'
72 62 2 if ($self->create)
129 63 0 if ($self->mysql_strict)
133 0 62 if ($storage->can('connect_call_set_strict_mode'))
139 60 3 if ($self->has_sqlite_fsync_mode)
143 60 0 if ($storage->sqlt_type eq 'SQLite')
204 63 0 unless ($schema->kiokudb_entries_source_name)
208 0 63 if ($self->has_schema_hook)
320 52 0 if ($self->storage->sqlt_type eq 'SQLite') { }
354 15 133 unless @entries
361 122 8 if ($self->extract)
367 3 3391 if ($entry->deleted or not $entry->has_object) { }
395 2 3409 if ($id =~ /^dbic:schema/) { }
2 3407 elsif ($id =~ /^dbic:row:/) { }
400 87 3320 $entry->prev ? :
416 3280 128 $entry->root ? :
424 0 6785 if (my $extract = $cols->{$column}) { }
6749 36 elsif (ref(my $data = $entry->data) eq 'HASH') { }
425 0 0 if (my $obj = $entry->object)
430 3424 3325 if (exists $data->{$column} and not ref(my $value = $data->{$column}))
448 125 8 if ($self->extract)
449 0 250 unless $_->{'id'}
125 0 if (my(@ids) = map({@{[] unless $_->{'id'};};} $insert, $update))
477 1805 0 if (exists $colinfo->{$column_name})
487 0 260 unless $sth->execute_array({'ArrayTupleStatus', []})
501 0 456 $self->_for_update ? :
556 2 3577 if (/^dbic:schema/) { }
6 3571 elsif (/^dbic:row:/) { }
576 0 6 if (@key > 1) { }
591 0 301 unless @rows_and_ids
597 296 5 if (@$ids)
624 4 297 if (@$rows)
633 0 0 unless my $obj = $schema->resultset($rs_name)->find(@key)
642 0 0 if ref $_ and &refaddr($_) == &refaddr($err)
643 0 4 unless my($rs_keys, $rs_ids) = &try(sub { $self->_group_dbic_keys($rows, sub { my($id, $rs_name, @key) = @_; die $err unless my $obj = $schema->resultset($rs_name)->find(@key); $entries{$id} = 'KiokuDB::Entry'->new('id', $id, 'class', ref $obj, 'data', $obj); } ); } , &catch(sub { die $_ if ref $_ and &refaddr($_) == &refaddr($err); } ))
652 3 1 if (@$ids == 1) { }
655 0 3 unless my $obj = $rs->find($rs_keys->{$rs_name}[0])
669 0 1 if @objs != @$ids
688 1 1 $_ eq 'dbic:schema' ? :
699 6 295 if @rows_and_ids != keys %entries
701 0 295 if &any(sub { not defined $_; } , @entries{@rows_and_ids})
703 7 3508 ref $_ ? :
711 6 9 ref $_ ? :
722 15 0 if ($self->extract)
743 0 55 unless @rows_and_ids
751 54 1 if (@$ids)
769 1 54 if (@$rows)
793 0 0 if ($_ eq 'dbic:schema') { }
0 0 elsif (/^dbic:schema:(.*)/) { }
903 11 1 ref $spec->{'values'} eq 'ARRAY' ? :
904 1 11 if ($spec->{'method'} eq 'set') { }
1 10 elsif ($spec->{'method'} eq 'all' and @v > 1) { }
907 0 1 unless $op =~ /^(UNION|INTERSECT|EXCEPT)$/i
912 0 1 unless ref $spec->{'subqueries'} eq 'ARRAY' and scalar @{$spec->{'subqueries'};}
954 62 0 $self->storage->sqlt_type eq 'SQLite' ? :
957 124 62 unless defined $arg
976 5 57 unless ($self->tables_exist)
995 0 4 if $_[0]
997 3 1 if ($self->has_storage)
1005 0 0 if (grep {not $_ =~ /^(?:entries|gin_index)/;} map({$_->[2];} @{$self->_table_info;})) { }
1009 0 0 $args{'class'} || $cmd ? :
1013 0 0 $cmd ? :