| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package FU::Pg 1.4; |
|
2
|
4
|
|
|
4
|
|
696079
|
use v5.36; |
|
|
4
|
|
|
|
|
32
|
|
|
3
|
4
|
|
|
4
|
|
2055
|
use FU::XS; |
|
|
4
|
|
|
|
|
48
|
|
|
|
4
|
|
|
|
|
1731
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
_load_libpq(); |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package FU::Pg::conn { |
|
8
|
0
|
|
|
0
|
|
|
sub lib_version { FU::Pg::lib_version() } |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub SQL { |
|
11
|
0
|
|
|
0
|
|
|
require FU::SQL; |
|
12
|
0
|
|
|
|
|
|
my $s = shift; |
|
13
|
|
|
|
|
|
|
my($sql, $params) = FU::SQL::SQL(@_)->compile( |
|
14
|
|
|
|
|
|
|
placeholder_style => 'pg', |
|
15
|
|
|
|
|
|
|
in_style => 'pg', |
|
16
|
0
|
|
|
0
|
|
|
quote_identifier => sub { $s->conn->escape_identifier(@_) }, |
|
17
|
0
|
|
|
|
|
|
); |
|
18
|
0
|
|
|
|
|
|
$s->sql($sql, @$params); |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
0
|
|
|
0
|
|
|
sub set_type($s, $n, @arg) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
22
|
0
|
0
|
0
|
|
|
|
Carp::confess("Invalid number of arguments") if @arg == 0 || (@arg > 1 && @arg % 2); |
|
|
|
|
0
|
|
|
|
|
|
23
|
0
|
0
|
|
|
|
|
return $s->_set_type($n, $arg[0], $arg[0]) if @arg == 1; |
|
24
|
0
|
|
|
|
|
|
my %arg = @arg; |
|
25
|
0
|
|
|
|
|
|
$s->_set_type($n, $arg{send}, $arg{recv}); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
}; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
*FU::Pg::txn::SQL = \*FU::Pg::conn::SQL; |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# Compat |
|
32
|
|
|
|
|
|
|
*FU::Pg::conn::q = \*FU::Pg::conn::sql; |
|
33
|
|
|
|
|
|
|
*FU::Pg::txn::q = \*FU::Pg::txn::sql; |
|
34
|
|
|
|
|
|
|
*FU::Pg::conn::Q = \*FU::Pg::conn::SQL; |
|
35
|
|
|
|
|
|
|
*FU::Pg::txn::Q = \*FU::Pg::txn::SQL; |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
package FU::Pg::error { |
|
38
|
4
|
|
|
4
|
|
2974
|
use overload '""' => sub($e, @) { $e->{full_message} }; |
|
|
4
|
|
|
0
|
|
12567
|
|
|
|
4
|
|
|
|
|
58
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
|
42
|
|
|
|
|
|
|
__END__ |