| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# DESCRIPTION |
|
3
|
|
|
|
|
|
|
# PerlORM - Object relational mapper (ORM) for Perl. PerlORM is Perl |
|
4
|
|
|
|
|
|
|
# library that implements object-relational mapping. Its features are |
|
5
|
|
|
|
|
|
|
# much similar to those of Java's Hibernate library, but interface is |
|
6
|
|
|
|
|
|
|
# much different and easier to use. |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# AUTHOR |
|
9
|
|
|
|
|
|
|
# Alexey V. Akimov |
|
10
|
|
|
|
|
|
|
# |
|
11
|
|
|
|
|
|
|
# COPYRIGHT |
|
12
|
|
|
|
|
|
|
# Copyright (C) 2005-2006 Alexey V. Akimov |
|
13
|
|
|
|
|
|
|
# |
|
14
|
|
|
|
|
|
|
# This library is free software; you can redistribute it and/or |
|
15
|
|
|
|
|
|
|
# modify it under the terms of the GNU Lesser General Public |
|
16
|
|
|
|
|
|
|
# License as published by the Free Software Foundation; either |
|
17
|
|
|
|
|
|
|
# version 2.1 of the License, or (at your option) any later version. |
|
18
|
|
|
|
|
|
|
# |
|
19
|
|
|
|
|
|
|
# This library is distributed in the hope that it will be useful, |
|
20
|
|
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
21
|
|
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
22
|
|
|
|
|
|
|
# Lesser General Public License for more details. |
|
23
|
|
|
|
|
|
|
# |
|
24
|
|
|
|
|
|
|
# You should have received a copy of the GNU Lesser General Public |
|
25
|
|
|
|
|
|
|
# License along with this library; if not, write to the Free Software |
|
26
|
|
|
|
|
|
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
27
|
|
|
|
|
|
|
# |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
package ORM::Db::DBIResultSetFull; |
|
30
|
|
|
|
|
|
|
|
|
31
|
4
|
|
|
4
|
|
23
|
use base 'ORM::DbResultSet'; |
|
|
4
|
|
|
|
|
9
|
|
|
|
4
|
|
|
|
|
1112
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
$VERSION = 0.8; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub new |
|
36
|
|
|
|
|
|
|
{ |
|
37
|
1
|
|
|
1
|
0
|
3
|
my $class = shift; |
|
38
|
1
|
|
|
|
|
3
|
my %arg = @_; |
|
39
|
1
|
|
|
|
|
5
|
my $self = { iterator=>0, rows=>[] }; |
|
40
|
|
|
|
|
|
|
|
|
41
|
1
|
|
|
|
|
5
|
return bless $self, $class; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub next_row |
|
45
|
|
|
|
|
|
|
{ |
|
46
|
2
|
|
|
2
|
0
|
3
|
my $self = shift; |
|
47
|
2
|
|
|
|
|
3
|
my $row; |
|
48
|
|
|
|
|
|
|
|
|
49
|
2
|
100
|
|
|
|
4
|
if( $self->{iterator} < @{$self->{rows}} ) |
|
|
2
|
|
|
|
|
8
|
|
|
50
|
|
|
|
|
|
|
{ |
|
51
|
1
|
|
|
|
|
5
|
$row = $self->{rows}[ $self->{iterator} ]; |
|
52
|
1
|
|
|
|
|
3
|
$self->{rows}[ $self->{iterator} ] = undef; |
|
53
|
1
|
|
|
|
|
3
|
$self->{iterator}++; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
2
|
|
|
|
|
10
|
return $row; |
|
57
|
|
|
|
|
|
|
} |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub rows |
|
60
|
|
|
|
|
|
|
{ |
|
61
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
|
62
|
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
0
|
scalar @{$self->{rows}}; |
|
|
0
|
|
|
|
|
0
|
|
|
64
|
|
|
|
|
|
|
} |
|
65
|
|
|
|
|
|
|
|
|
66
|
0
|
|
|
0
|
0
|
0
|
sub result_tables { undef; } |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
## |
|
69
|
|
|
|
|
|
|
## OBJECT METHODS |
|
70
|
|
|
|
|
|
|
## |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub add_row |
|
73
|
|
|
|
|
|
|
{ |
|
74
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
|
75
|
1
|
|
|
|
|
2
|
my $row = shift; |
|
76
|
|
|
|
|
|
|
|
|
77
|
1
|
|
|
|
|
3
|
push @{$self->{rows}}, $row; |
|
|
1
|
|
|
|
|
10
|
|
|
78
|
|
|
|
|
|
|
} |