Eve/PgSqlType/DriverNative.pm

filter: Statementstmt 100% 3 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 4 / 4 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Eve/PgSqlType/DoubleArray.pm ↑ Summary Eve/PgSqlType/Geometry.pm »
1 package Eve::PgSqlType::DriverNative;
2  
3 2 ▶use parent qw(Eve::PgSqlType);
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 use strict;
6 use warnings;
7  
8 =head1 NAME
9  
10 B<Eve::PgSqlType::DriverNative> - a PostgreSQL type native for
11 B<DBD::Pg> B<DBI> driver.
12  
13 =head1 SYNOPSIS
14  
15 package Eve::PgSqlType::Bigint;
16  
17 use parent qw(Eve::PgSqlType::DriverNative);
18  
19 sub get_type {
20 return DBD::Pg::PG_INT8;
21 }
22  
23 1;
24  
25 =head1 DESCRIPTION
26  
27 B<Eve::PgSqlType::DriverNative> is a base class for PostgreSQL
28 types natively supported by B<DBD::Pg> B<DBI> driver.
29  
30 =head1 METHODS
31  
32 =head2 B<wrap()>
33  
34 Leaves all the processing issues to the driver returning the
35 expression as is.
36  
37 =head3 Arguments
38  
39 =over 4
40  
41 =item C<expression>
42  
43 =back
44  
45 =head3 Returns
46  
47 The same expression.
48  
49 =cut
50  
51 sub wrap {
52 my ($self, %arg_hash) = @_;
53 Eve::Support::arguments(\%arg_hash, my $expression);
54  
55 return $expression;
56 }
57  
58 =head2 B<serialize()>
59  
60 Leaves all the serialization issues to the driver returning the value
61 as is.
62  
63 =head3 Arguments
64  
65 =over 4
66  
67 =item C<value>
68  
69 =back
70  
71 =head3 Returns
72  
73 The same value.
74  
75 =cut
76  
77 sub serialize {
78 my ($self, %arg_hash) = @_;
79 Eve::Support::arguments(\%arg_hash, my $value);
80  
81 return $value;
82 }
83  
84 =head2 B<deserialize()>
85  
86 Leaves all the deserialization issues to the driver returning the
87 value as is.
88  
89 =head3 Arguments
90  
91 =over 4
92  
93 =item C<value>
94  
95 =back
96  
97 =head3 Returns
98  
99 The same value.
100  
101 =cut
102  
103 sub deserialize {
104 my ($self, %arg_hash) = @_;
105 Eve::Support::arguments(\%arg_hash, my $value);
106  
107 return $value;
108 }
109  
110 =head1 SEE ALSO
111  
112 =over 4
113  
114 =item L<DBI>
115  
116 =item L<DBD::Pg>
117  
118 =item L<Eve::PgSqlType>
119  
120 =back
121  
122 =head1 LICENSE AND COPYRIGHT
123  
124 Copyright 2012 Igor Zinovyev.
125  
126 This program is free software; you can redistribute it and/or modify it
127 under the terms of either: the GNU General Public License as published
128 by the Free Software Foundation; or the Artistic License.
129  
130 See http://dev.perl.org/licenses/ for more information.
131  
132  
133 =head1 AUTHOR
134  
135 =over 4
136  
137 =item L<Sergey Konoplev|mailto:gray.ru@gmail.com>
138  
139 =back
140  
141 =cut
142  
143 1;
« Eve/PgSqlType/DoubleArray.pm ↑ Summary Eve/PgSqlType/Geometry.pm »