blib/lib/DBIx/SimpleMigration/Client/SQLite.pm

filter: Statementstmt 100% 9 / 9 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 92.3% 12 / 13 CC 2 SCAR 5.2
CC
2
Cov
91%
_migrations_table_exists
2.0
BEGIN
1.0
CRAP 1.7
« blib/lib/DBIx/SimpleMigration/Client.pm ↑ Summary Build »
1 package DBIx::SimpleMigration::Client::SQLite;
2  
3 1 ▶use parent qw(DBIx::SimpleMigration::Client);
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 our $VERSION = '1.0.1';
6  
7 sub _migrations_table_exists {
8 1 ▶ my ($self) = @_;
Subroutine _migrations_table_exists: called CC=2 SCAR=7.0
9  
10 1 my $query = "
11 SELECT EXISTS (
12 SELECT NULL
13 FROM sqlite_master
14 WHERE type = 'table' AND name = ?
15 )
16 ";
17  
18 1 ▶ my $row = $self->{dbh}->selectrow_hashref($query, {}, $self->{_options}->{migrations_table}) or die 'Database error: ' . $self->{dbh}->errstr;
Branch: 1 branch
BranchTrueFalseTotal
my $row = $self->{"dbh"}->selectrow_hashref($query, {}, $self->{"_options"}{"migrations_table"}) or die 'Database error: ' . $self->{"dbh"}->errstr 0 1 1
19  
20 1 return $row->{exists};
21 }
22  
23 1 1;
« blib/lib/DBIx/SimpleMigration/Client.pm ↑ Summary Build »