line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package SQL::SqlObject::Pg;
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7818
|
use strict;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
43
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
5
|
1
|
|
|
1
|
|
737
|
use SQL::SqlObject;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
32
|
|
6
|
1
|
|
|
1
|
|
8
|
use base 'SQL::SqlObject';
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
485
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.01';
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
SQL::SqlObject::Config::set 'HOST';
|
11
|
|
|
|
|
|
|
SQL::SqlObject::Config::set 'PORT';
|
12
|
|
|
|
|
|
|
SQL::SqlObject::Config::set 'OPTIONS';
|
13
|
|
|
|
|
|
|
SQL::SqlObject::Config::set 'TTY';
|
14
|
|
|
|
|
|
|
SQL::SqlObject::Config::set DSN => 'dbi:Pg';
|
15
|
|
|
|
|
|
|
SQL::SqlObject::Config::set NAME_PREFIX => 'dbname=';
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
SQL::SqlObject::Config::set OTHER_ARGS => (
|
18
|
|
|
|
|
|
|
'db_host',
|
19
|
|
|
|
|
|
|
'db_port',
|
20
|
|
|
|
|
|
|
'db_options',
|
21
|
|
|
|
|
|
|
'db_tty'
|
22
|
|
|
|
|
|
|
);
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_arg (
|
25
|
|
|
|
|
|
|
'db_host',
|
26
|
|
|
|
|
|
|
'host|pg_host|pghost',
|
27
|
|
|
|
|
|
|
'PGHOST',
|
28
|
|
|
|
|
|
|
'HOST',
|
29
|
|
|
|
|
|
|
'db_dsn'
|
30
|
|
|
|
|
|
|
);
|
31
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_arg (
|
32
|
|
|
|
|
|
|
'db_port',
|
33
|
|
|
|
|
|
|
'port|pg_port',
|
34
|
|
|
|
|
|
|
'PGPORT',
|
35
|
|
|
|
|
|
|
'PORT',
|
36
|
|
|
|
|
|
|
'db_dsn'
|
37
|
|
|
|
|
|
|
);
|
38
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_arg (
|
39
|
|
|
|
|
|
|
'db_options',
|
40
|
|
|
|
|
|
|
'opts|options|pg_options',
|
41
|
|
|
|
|
|
|
'PGOPTIONS',
|
42
|
|
|
|
|
|
|
'OPTIONS',
|
43
|
|
|
|
|
|
|
'db_dsn'
|
44
|
|
|
|
|
|
|
);
|
45
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_arg (
|
46
|
|
|
|
|
|
|
'db_tty',
|
47
|
|
|
|
|
|
|
'tty|pg_tty',
|
48
|
|
|
|
|
|
|
'PGTTY',
|
49
|
|
|
|
|
|
|
'TTY',
|
50
|
|
|
|
|
|
|
'db_dsn'
|
51
|
|
|
|
|
|
|
);
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_enviroment_variable 'db_name' => 'PGDATABASE';
|
54
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_enviroment_variable 'db_user' => 'PGUSER';
|
55
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_enviroment_variable 'db_password' => 'PGPASSWORD';
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_alias 'db_name', ('pg_database',
|
58
|
|
|
|
|
|
|
'pgdatabase',
|
59
|
|
|
|
|
|
|
'dbname');
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_alias 'db_user', ('pg_user',
|
62
|
|
|
|
|
|
|
'pguser',
|
63
|
|
|
|
|
|
|
'pg_username',
|
64
|
|
|
|
|
|
|
'pgusername');
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
SQL::SqlObject::Config::add_alias 'db_password', ('pg_pass',
|
67
|
|
|
|
|
|
|
'pgpass',
|
68
|
|
|
|
|
|
|
'pg_password',
|
69
|
|
|
|
|
|
|
'pgpassword');
|
70
|
|
|
|
|
|
|
|
71
|
3
|
50
|
|
3
|
0
|
192
|
sub db_host : lvalue { $#_ and $_[0]->{pg_host} = $_[1]; $_[0]->{pg_host} }
|
|
3
|
|
|
|
|
13
|
|
72
|
3
|
50
|
|
3
|
0
|
418
|
sub db_port : lvalue { $#_ and $_[0]->{pg_port} = $_[1]; $_[0]->{pg_port} }
|
|
3
|
|
|
|
|
13
|
|
73
|
0
|
0
|
|
0
|
0
|
0
|
sub db_options : lvalue { $#_ and $_[0]->{pg_ops} = $_[1]; $_[0]->{pg_ops} }
|
|
0
|
|
|
|
|
0
|
|
74
|
3
|
50
|
|
3
|
0
|
195
|
sub db_tty : lvalue { $#_ and $_[0]->{pg_tty} = $_[1]; $_[0]->{pg_tty} }
|
|
3
|
|
|
|
|
11
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1;
|
77
|
|
|
|
|
|
|
__END__
|