| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Geoffrey::Converter::Pg::Tables; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
563927
|
use utf8; |
|
|
2
|
|
|
|
|
412
|
|
|
|
2
|
|
|
|
|
16
|
|
|
4
|
2
|
|
|
2
|
|
115
|
use 5.016; |
|
|
2
|
|
|
|
|
8
|
|
|
5
|
2
|
|
|
2
|
|
12
|
use strict; |
|
|
2
|
|
|
|
|
5
|
|
|
|
2
|
|
|
|
|
91
|
|
|
6
|
2
|
|
|
2
|
|
670
|
use Readonly; |
|
|
2
|
|
|
|
|
6069
|
|
|
|
2
|
|
|
|
|
171
|
|
|
7
|
2
|
|
|
2
|
|
16
|
use warnings; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
203
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$Geoffrey::Converter::Pg::Tables::VERSION = '0.000204'; |
|
10
|
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
16
|
use parent 'Geoffrey::Role::ConverterType'; |
|
|
2
|
|
|
|
|
6
|
|
|
|
2
|
|
|
|
|
15
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
1
|
1356
|
sub add { return q~CREATE TABLE {0} ( {1} )~; } |
|
14
|
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
1
|
6
|
sub drop { return q~DROP TABLE {0}~; } |
|
16
|
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
1
|
35
|
sub alter { return q~ALTER TABLE {0}~; } |
|
18
|
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
1
|
5
|
sub add_column { return $_[0]->alter . q~ ADD COLUMN {1}~; } |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub list { |
|
22
|
1
|
|
|
1
|
1
|
3
|
my ( $self, $schema ) = @_; |
|
23
|
1
|
|
|
|
|
5
|
return q~SELECT t.* |
|
24
|
|
|
|
|
|
|
FROM information_schema.tables t |
|
25
|
|
|
|
|
|
|
WHERE t.table_type != 'VIEW' AND t.table_schema=?~; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub s_list_columns { |
|
29
|
1
|
|
|
1
|
1
|
3
|
my ( $self, $schema ) = @_; |
|
30
|
1
|
|
|
|
|
5
|
return q~SELECT * |
|
31
|
|
|
|
|
|
|
FROM information_schema.columns |
|
32
|
|
|
|
|
|
|
WHERE table_name = ? |
|
33
|
|
|
|
|
|
|
AND table_schema = ?~; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; # End of Geoffrey::Converter::Pg::Tables |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |