[Rt-commit] r4344 - in Jifty-DBI/trunk: . lib/Jifty/DBI
alexmv at bestpractical.com
alexmv at bestpractical.com
Fri Dec 23 13:31:04 EST 2005
Author: alexmv
Date: Fri Dec 23 13:31:03 2005
New Revision: 4344
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
Log:
r8018 at zoq-fot-pik: chmrr | 2005-12-23 13:30:26 -0500
* clean_slate calls implicit_clauses to let the collection do some setup
* unlimit calls clean_slate
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm Fri Dec 23 13:31:03 2005
@@ -102,7 +102,6 @@
@_
);
$self->_handle( $args{'handle'} ) if ($args{'handle'});
- $self->_init_pager();
$self->clean_slate();
}
@@ -128,6 +127,7 @@
sub clean_slate {
my $self = shift;
$self->redo_search();
+ $self->_init_pager();
$self->{'itemscount'} = 0;
$self->{'tables'} = "";
$self->{'auxillary_tables'} = "";
@@ -150,11 +150,18 @@
_close_parens
);
- # Force ourselves to have no limit statements. do_search won't
- # work.
+ $self->implicit_clauses();
$self->_is_limited(0);
}
+=head2 implicit_clauses
+
+Called by L</clean_slate> to set up any implicit clauses that the
+collection B<always> has. Defaults to doing nothing.
+
+=cut
+
+sub implicit_clauses {}
=head2 _handle [DBH]
@@ -579,7 +586,8 @@
sub unlimit {
my $self = shift;
- $self->redo_search();
+
+ $self->clean_slate();
$self->_is_limited(-1);
}
More information about the Rt-commit
mailing list