line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Converter::SQLite::Tables; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
36
|
use utf8; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
51
|
|
4
|
5
|
|
|
5
|
|
218
|
use 5.016; |
|
5
|
|
|
|
|
19
|
|
5
|
5
|
|
|
5
|
|
27
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
112
|
|
6
|
5
|
|
|
5
|
|
38
|
use Readonly; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
290
|
|
7
|
5
|
|
|
5
|
|
31
|
use warnings; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
351
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$Geoffrey::Converter::SQLite::Tables::VERSION = '0.000204'; |
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
5
|
|
39
|
use parent 'Geoffrey::Role::ConverterType'; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
30
|
|
12
|
|
|
|
|
|
|
|
13
|
10
|
|
|
10
|
1
|
69
|
sub add { return q~CREATE TABLE {0} ( {1} )~; } |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
1
|
5
|
sub drop { return q~DROP TABLE {0}~; } |
16
|
|
|
|
|
|
|
|
17
|
6
|
|
|
6
|
1
|
38
|
sub alter { return q~ALTER TABLE {0}~; } |
18
|
|
|
|
|
|
|
|
19
|
6
|
|
|
6
|
1
|
23
|
sub add_column { return $_[0]->alter . q~ ADD COLUMN {1}~; } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub list { |
22
|
3
|
|
|
3
|
1
|
11
|
my ( $self, $schema ) = @_; |
23
|
3
|
|
|
|
|
15
|
require Geoffrey::Utils; |
24
|
|
|
|
|
|
|
return |
25
|
3
|
|
|
|
|
21
|
q~SELECT name FROM ~ |
26
|
|
|
|
|
|
|
. Geoffrey::Utils::add_schema($schema) |
27
|
|
|
|
|
|
|
. q~sqlite_master WHERE type='table'~; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub s_list_columns { |
31
|
3
|
|
|
3
|
1
|
11
|
my ( $self, $schema ) = @_; |
32
|
3
|
|
|
|
|
13
|
require Geoffrey::Utils; |
33
|
|
|
|
|
|
|
return |
34
|
3
|
|
|
|
|
18
|
q~SELECT sql FROM ~ |
35
|
|
|
|
|
|
|
. Geoffrey::Utils::add_schema($schema) |
36
|
|
|
|
|
|
|
. q~sqlite_master WHERE type='table' AND name=?~; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; # End of Geoffrey::Converter::SQLite::Tables |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |