Geoffrey/Converter/SQLite/Tables.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 12 / 12 Podpod 100% 6 / 6 totaltotal 100% 47 / 47 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Geoffrey/Action/Sql.pm ↑ Summary Geoffrey/Exception/Database.pm »
1 package Geoffrey::Converter::SQLite::Tables;
2  
3 5 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 $Geoffrey::Converter::SQLite::Tables::VERSION = '0.000206';
10  
11 5 ▶use parent 'Geoffrey::Role::ConverterType';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 10 ▶sub add { return q~CREATE TABLE {0} ( {1} )~; }
Subroutine add: called CC=1 SCAR=0.0
Pod documented
14  
15 1 ▶sub drop { return q~DROP TABLE {0}~; }
Subroutine drop: called CC=1 SCAR=0.0
Pod documented
16  
17 6 ▶sub alter { return q~ALTER TABLE {0}~; }
Subroutine alter: called CC=1 SCAR=0.0
Pod documented
18  
19 6 ▶sub add_column { return $_[0]->alter . q~ ADD COLUMN {1}~; }
Subroutine add_column: called CC=1 SCAR=0.0
Pod documented
20  
21 3 ▶sub list {
Subroutine list: called CC=1 SCAR=0.0
Pod documented
22 3 my ( $self, $schema ) = @_;
23 3 require Geoffrey::Utils;
24 return
25 3 q~SELECT name FROM ~
26 . Geoffrey::Utils::add_schema($schema)
27 . q~sqlite_master WHERE type='table'~;
28 }
29  
30 3 ▶sub s_list_columns {
Subroutine s_list_columns: called CC=1 SCAR=0.0
Pod documented
31 3 my ( $self, $schema ) = @_;
32 3 require Geoffrey::Utils;
33 return
34 3 q~SELECT sql FROM ~
35 . Geoffrey::Utils::add_schema($schema)
36 . q~sqlite_master WHERE type='table' AND name=?~;
37 }
38  
39 5 1; # End of Geoffrey::Converter::SQLite::Tables
40  
41 __END__
« Geoffrey/Action/Sql.pm ↑ Summary Geoffrey/Exception/Database.pm »