JESP/Driver/SQLite.pm

filter: Statementstmt 100% 12 / 12 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod 100% 1 / 1 totaltotal 94.1% 16 / 17 CC 2 SCAR 5.2
CC
2
Cov
93%
apply_sql
2.0
BEGIN
1.0
CRAP 1.7
« JESP/Plan.pm ↑ Summary JESP/Cmd/Command/deploy.pm »
1 package App::JESP::Driver::SQLite;
2 2 $App::JESP::Driver::SQLite::VERSION = '0.016';
3 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 extends qw/App::JESP::Driver/;
5  
6 =head1 NAME
7  
8 App::JESP::Driver::SQLite - SQLite driver. Subclasses App::JESP::Driver
9  
10 =cut
11  
12 =head2 apply_sql
13  
14 Specific version that allows multiple statements in SQLite.
15 See superclass.
16  
17 =cut
18  
19 5 ▶sub apply_sql{
Subroutine apply_sql: called CC=2 SCAR=7.0
Pod documented
20 5 my ($self, $sql) = @_;
21 # note that we reuse the same dbh as the application.
22 5 my $dbh = $self->jesp()->dbix_simple()->dbh();
23 5 local $dbh->{sqlite_allow_multiple_statements} = 1;
24 5 my $ret = $dbh->do( $sql );
25 5 ▶ return defined($ret) ? $ret : confess( $dbh->errstr() );
Branch: 1 branch
BranchTrueFalseTotal
defined $ret ? : 5 0 5
26 }
27  
28 2 __PACKAGE__->meta->make_immutable();
29 2 1;
« JESP/Plan.pm ↑ Summary JESP/Cmd/Command/deploy.pm »