[Jifty-commit] r5861 - in Jifty-DBI/trunk: lib/Jifty/DBI

Jifty commits jifty-commit at lists.jifty.org
Fri Sep 19 18:58:48 EDT 2008


Author: ruz
Date: Fri Sep 19 18:58:47 2008
New Revision: 5861

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm

Log:
 r5880 at cubic-pc:  cubic | 2008-09-19 04:33:41 +0400
 * turn _handle _is_limited rows_per_page into accessors


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 Sep 19 18:58:47 2008
@@ -68,7 +68,7 @@
 use Clone;
 use Carp qw/croak/;
 use base qw/Class::Accessor::Fast/;
-__PACKAGE__->mk_accessors(qw/pager prefetch_related derived/);
+__PACKAGE__->mk_accessors(qw/pager prefetch_related derived _handle _is_limited rows_per_page/);
 
 =head1 METHODS
 
@@ -152,7 +152,6 @@
     $self->{'order'}            = "";
     $self->{'alias_count'}      = 0;
     $self->{'first_row'}        = 0;
-    $self->{'show_rows'}        = 0;
 
     delete $self->{$_} for qw(
         items
@@ -165,6 +164,7 @@
         criteria_count
     );
 
+    $self->rows_per_page(0);
     $self->implicit_clauses(%args);
     $self->_is_limited(0);
 }
@@ -185,14 +185,6 @@
 
 =cut
 
-sub _handle {
-    my $self = shift;
-    if (@_) {
-        $self->{'DBIxhandle'} = shift;
-    }
-    return ( $self->{'DBIxhandle'} );
-}
-
 =head2 _do_search
 
 This internal private method actually executes the search on the
@@ -463,15 +455,6 @@
 
 =cut
 
-sub _is_limited {
-    my $self = shift;
-    if (@_) {
-        $self->{'is_limited'} = shift;
-    } else {
-        return ( $self->{'is_limited'} );
-    }
-}
-
 =head2 build_select_query
 
 Builds a query string for a "SELECT rows from Tables" statement for
@@ -1872,13 +1855,6 @@
 
 =cut
 
-sub rows_per_page {
-    my $self = shift;
-    $self->{'show_rows'} = shift if (@_);
-
-    return ( $self->{'show_rows'} );
-}
-
 =head2 first_row
 
 Get or set the first row of the result set the database should return.


More information about the Jifty-commit mailing list