Pg/Tables.pm

filter: Statementstmt 65.5% 19 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 6 / 12 Podpod 100% 6 / 6 totaltotal 65.9% 31 / 47 CC 1 SCAR 4.1
CC
1
Cov
66%
add
2.0
drop
2.0
alter
2.0
CRAP 1.5
« Pg.pm ↑ Summary
1 package Geoffrey::Converter::Pg::Tables;
2  
3 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use 5.016;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Readonly;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 $Geoffrey::Converter::Pg::Tables::VERSION = '0.000201';
10  
11 1 ▶use parent 'Geoffrey::Role::ConverterType';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 0 ▶sub add { return q~CREATE TABLE {0} ( {1} )~; }
Subroutine add: not called CC=1 SCAR=6.9
Pod documented
14  
15 0 ▶sub drop { return q~DROP TABLE {0}~; }
Subroutine drop: not called CC=1 SCAR=6.9
Pod documented
16  
17 0 ▶sub alter { return q~ALTER TABLE {0}~; }
Subroutine alter: not called CC=1 SCAR=6.9
Pod documented
18  
19 0 ▶sub add_column { return $_[0]->alter . q~ ADD COLUMN {1}~; }
Subroutine add_column: not called CC=1 SCAR=6.9
Pod documented
20  
21 sub list {
22 0 ▶ my ( $self, $schema ) = @_;
Subroutine list: not called CC=1 SCAR=6.9
Pod documented
23 0 require Geoffrey::Utils;
24 0 return q~SELECT t.*
25 FROM information_schema.tables t
26 WHERE t.table_type != 'VIEW' AND t.table_schema=?~;
27 }
28  
29 sub s_list_columns {
30 0 ▶ my ( $self, $schema ) = @_;
Subroutine s_list_columns: not called CC=1 SCAR=6.9
Pod documented
31 0 require Geoffrey::Utils;
32 0 return q~SELECT *
33 FROM information_schema.columns
34 WHERE table_name = ?
35 AND table_schema = ?~;
36 }
37  
38 1 1; # End of Geoffrey::Converter::Pg::Tables
39  
40 __END__
« Pg.pm ↑ Summary