SimpleMigration/Client/SQLite.pm

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