line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Converter::Pg::Tables; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
1805
|
use utf8; |
|
2
|
|
|
|
|
17
|
|
|
2
|
|
|
|
|
10
|
|
4
|
2
|
|
|
2
|
|
83
|
use 5.016; |
|
2
|
|
|
|
|
7
|
|
5
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
37
|
|
6
|
2
|
|
|
2
|
|
483
|
use Readonly; |
|
2
|
|
|
|
|
4092
|
|
|
2
|
|
|
|
|
101
|
|
7
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
98
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$Geoffrey::Converter::Pg::Tables::VERSION = '0.000203'; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
422
|
use parent 'Geoffrey::Role::ConverterType'; |
|
2
|
|
|
|
|
281
|
|
|
2
|
|
|
|
|
11
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
1
|
919
|
sub add { return q~CREATE TABLE {0} ( {1} )~; } |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
1
|
8
|
sub drop { return q~DROP TABLE {0}~; } |
16
|
|
|
|
|
|
|
|
17
|
2
|
|
|
2
|
1
|
10
|
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__ |