line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Geoffrey::Converter::SQLite::Tables; |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
36
|
use utf8; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
27
|
|
4
|
5
|
|
|
5
|
|
198
|
use 5.016; |
|
5
|
|
|
|
|
17
|
|
5
|
5
|
|
|
5
|
|
24
|
use strict; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
111
|
|
6
|
5
|
|
|
5
|
|
40
|
use Readonly; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
281
|
|
7
|
5
|
|
|
5
|
|
31
|
use warnings; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
357
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$Geoffrey::Converter::SQLite::Tables::VERSION = '0.000205'; |
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
5
|
|
44
|
use parent 'Geoffrey::Role::ConverterType'; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
27
|
|
12
|
|
|
|
|
|
|
|
13
|
10
|
|
|
10
|
1
|
56
|
sub add { return q~CREATE TABLE {0} ( {1} )~; } |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
1
|
1
|
6
|
sub drop { return q~DROP TABLE {0}~; } |
16
|
|
|
|
|
|
|
|
17
|
6
|
|
|
6
|
1
|
46
|
sub alter { return q~ALTER TABLE {0}~; } |
18
|
|
|
|
|
|
|
|
19
|
6
|
|
|
6
|
1
|
20
|
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
|
|
|
|
|
12
|
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
|
8
|
my ( $self, $schema ) = @_; |
32
|
3
|
|
|
|
|
14
|
require Geoffrey::Utils; |
33
|
|
|
|
|
|
|
return |
34
|
3
|
|
|
|
|
11
|
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__ |