line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::Database::PostgreSQL::Backend::NoticeResponse; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '1.005'; # VERSION |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
8
|
use parent qw(Protocol::Database::PostgreSQL::Backend); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Protocol::Database::PostgreSQL::Backend::NoticeResponse |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
0
|
0
|
|
sub type { 'notice_response' } |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new_from_message { |
21
|
0
|
|
|
0
|
1
|
|
my ($class, $msg) = @_; |
22
|
0
|
|
|
|
|
|
(undef, my $size) = unpack('C1N1', $msg); |
23
|
0
|
|
|
|
|
|
substr $msg, 0, 5, ''; |
24
|
0
|
|
|
|
|
|
my %notice; |
25
|
|
|
|
|
|
|
FIELD: |
26
|
0
|
|
|
|
|
|
while(length($msg)) { |
27
|
0
|
|
|
|
|
|
my ($code, $str) = unpack('A1Z*', $msg); |
28
|
0
|
0
|
0
|
|
|
|
last FIELD unless $code && $code ne "\0"; |
29
|
|
|
|
|
|
|
|
30
|
0
|
0
|
|
|
|
|
die "Unknown NOTICE code [$code]" unless exists $Protocol::Database::PostgreSQL::NOTICE_CODE{$code}; |
31
|
0
|
|
|
|
|
|
$notice{$Protocol::Database::PostgreSQL::NOTICE_CODE{$code}} = $str; |
32
|
0
|
|
|
|
|
|
substr $msg, 0, 2+length($str), ''; |
33
|
|
|
|
|
|
|
} |
34
|
0
|
|
|
|
|
|
return $class->new( |
35
|
|
|
|
|
|
|
%notice |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 AUTHOR |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Tom Molesworth |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 LICENSE |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Copyright Tom Molesworth 2010-2019. Licensed under the same terms as Perl itself. |
48
|
|
|
|
|
|
|
|