59 |
EOF |
EOF |
60 |
} |
} |
61 |
|
|
62 |
|
=head2 current |
63 |
|
|
64 |
|
Selects only current (null end_t) rows. Takes one parameter: the |
65 |
|
table. |
66 |
|
|
67 |
|
=cut |
68 |
|
|
69 |
|
sub current |
70 |
|
{ |
71 |
|
my $self = shift; |
72 |
|
my $table = shift; |
73 |
|
|
74 |
|
$table = $table->name |
75 |
|
if ref $table; |
76 |
|
|
77 |
|
return $self->raw (sprintf <<EOF, $table, $table); |
78 |
|
<!-- Only current %s's, please --> |
79 |
|
<null> |
80 |
|
<cfield name=\"_%s_data._end_t\"/> |
81 |
|
</null> |
82 |
|
EOF |
83 |
|
|
84 |
|
} |
85 |
|
|
86 |
|
|
87 |
=head2 raw |
=head2 raw |
88 |
|
|
98 |
|
|
99 |
my @args = map ref $_ ? $_->name : $_, @_; |
my @args = map ref $_ ? $_->name : $_, @_; |
100 |
|
|
101 |
$self->{CONDITION} .= sprintf $raw, @args; |
my $cond .= sprintf $raw, @args; |
102 |
|
|
103 |
|
$self->{CONDITION} .= $cond; |
104 |
|
|
105 |
return $self->{CONDITION}; |
return $cond; |
106 |
} |
} |
107 |
|
|
108 |
|
|
123 |
|
|
124 |
return $self->simple( $table, '_table', |
return $self->simple( $table, '_table', |
125 |
$table => 'id', |
$table => 'id', |
126 |
"_${table}_data" => '_table' ); |
"_${table}_data" => '_table' ) |
127 |
|
. $self->current($table) |
128 |
} |
} |
129 |
|
|
130 |
|
|