line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Eve::PgSqlType; |
2
|
|
|
|
|
|
|
|
3
|
14
|
|
|
14
|
|
12756
|
use parent qw(Eve::Class); |
|
14
|
|
|
|
|
28
|
|
|
14
|
|
|
|
|
151
|
|
4
|
|
|
|
|
|
|
|
5
|
14
|
|
|
14
|
|
735
|
use strict; |
|
14
|
|
|
|
|
26
|
|
|
14
|
|
|
|
|
432
|
|
6
|
14
|
|
|
14
|
|
72
|
use warnings; |
|
14
|
|
|
|
|
27
|
|
|
14
|
|
|
|
|
328
|
|
7
|
|
|
|
|
|
|
|
8
|
14
|
|
|
14
|
|
5574
|
use DBD::Pg (); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
B - a base class for PostgreSQL types. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package Eve::PgSqlType::Bigint; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use parent qw(Eve::PgSqlType); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Some implementation here |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
B is an base class for all PostgreSQL type classes. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 METHODS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 B |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
It must be overridden. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head3 Returns |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
A PostgreSQL data type value. See B for more information. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub get_type { |
41
|
|
|
|
|
|
|
Eve::Error::NotImplemented->throw(); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head2 B |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
If you need to implement some specific type you might be required to |
47
|
|
|
|
|
|
|
add implicitly casting statement or do another wrapping operation with |
48
|
|
|
|
|
|
|
the expression. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
It must be overridden. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head3 Arguments |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=over 4 |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item C |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
a text expression to be wrapper. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=back |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head3 Returns |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
A wrapped expression text. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub wrap { |
69
|
|
|
|
|
|
|
#my ($self, %arg_hash) = @_; |
70
|
|
|
|
|
|
|
#Eve::Support::arguments(\%arg_hash, my $expression); |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Eve::Error::NotImplemented->throw(); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head2 B |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Serializes a value into the database representation. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
It must be overriden. |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head3 Arguments |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=over 4 |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=item C |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
a value to serialize. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=back |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head3 Returns |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
A serizlized value. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=cut |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub serialize { |
98
|
|
|
|
|
|
|
#my ($self, %arg_hash) = @_; |
99
|
|
|
|
|
|
|
#Eve::Support::arguments(\%arg_hash, my $value); |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Eve::Error::NotImplemented->throw(); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 B |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Deserializes a value from the database representation. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
It must be overriden. |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head3 Arguments |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=over 4 |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item C |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
a value to deserialize. |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=back |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head3 Returns |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
A deserizlized value. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=cut |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
sub deserialize { |
127
|
|
|
|
|
|
|
#my ($self, %arg_hash) = @_; |
128
|
|
|
|
|
|
|
#Eve::Support::arguments(\%arg_hash, my $value); |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Eve::Error::NotImplemented->throw(); |
131
|
|
|
|
|
|
|
} |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=head1 SEE ALSO |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=over 4 |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=item L |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=item L |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=back |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
Copyright 2012 Igor Zinovyev. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
148
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
149
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=head1 AUTHOR |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=over 4 |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=item L |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=back |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=cut |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
1; |