File Coverage

blib/lib/DBIx/SimpleMigration/Client/SQLite.pm
Criterion Covered Total %
statement 10 10 100.0
branch 1 2 50.0
condition n/a
subroutine 3 3 100.0
pod n/a
total 14 15 93.3


line stmt bran cond sub pod time code
1             package DBIx::SimpleMigration::Client::SQLite;
2 1     1   4 use parent qw(DBIx::SimpleMigration::Client);
  1         0  
  1         6  
3              
4 1     1   56 use Carp;
  1         1  
  1         125  
5              
6             our $VERSION = '1.0.2';
7              
8             sub _migrations_table_exists {
9 1     1   1 my ($self) = @_;
10              
11 1         1 my $query = "
12             SELECT EXISTS (
13             SELECT NULL
14             FROM sqlite_master
15             WHERE type = 'table' AND name = ?
16             )
17             ";
18              
19 1 50       11 my $row = $self->{dbh}->selectrow_hashref($query, {}, $self->{_options}->{migrations_table}) or croak __PACKAGE__ . ': Database error: ' . $self->{dbh}->errstr;
20              
21 1         673 return $row->{exists};
22             }
23              
24             1;