[Rt-commit] r4053 - in Jifty-DBI/trunk: . lib/Jifty/DBI

jesse at bestpractical.com jesse at bestpractical.com
Tue Nov 8 16:14:02 EST 2005


Author: jesse
Date: Tue Nov  8 16:13:59 2005
New Revision: 4053

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Collection.pm
Log:
 r18572 at truegrounds:  jesse | 2005-11-08 15:31:12 -0500
 * removing deprecated paging interface


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	Tue Nov  8 16:13:59 2005
@@ -19,11 +19,11 @@
 
   use Jifty::DBI::Handle;
   my $handle = Jifty::DBI::Handle->new();
-  $handle->Connect( Driver => 'SQLite', Database => "my_test_db" );
+  $handle->connect( Driver => 'SQLite', Database => "my_test_db" );
 
   my $sb = My::Things->new( handle => $handle );
 
-  $sb->limit( field => "column_1", value => "matchstring" );
+  $sb->limit( column => "column_1", value => "matchstring" );
 
   while ( my $record = $sb->next ) {
       print $record->my_column_name();
@@ -907,7 +907,7 @@
 C<order> defaults to ASC(ending), DES(cending) is also a valid value.
 C<column> and C<function> have no default values.
 
-Use C<function> field instead of C<alias> and C<column> to order by
+Use C<function> instead of C<alias> and C<column> to order by
 the function value. Note that if you want use a column as argument of
 the function then you have to build correct reference with alias
 in the C<alias.column> format.
@@ -999,7 +999,7 @@
 C<alias> defaults to main.
 C<column> and C<function> have no default values.
 
-Use C<function> field instead of C<alias> and C<column> to group by
+Use C<function> instead of C<alias> and C<column> to group by
 the function value. Note that if you want use a column as argument
 of the function then you have to build correct reference with alias
 in the C<alias.column> format.
@@ -1112,14 +1112,14 @@
 
 The standard form takes a param hash with keys alias1, column1, alias2
 and column2. alias1 and alias2 are column aliases obtained from
-$self->new_alias or a $self->limit. column1 and column2 are the fields
+$self->new_alias or a $self->limit. column1 and column2 are the columns 
 in alias1 and alias2 that should be linked, respectively.  For this
 type of join, this method has no return value.
 
 Supplying the parameter type => 'left' causes Join to preform a left
 join.  in this case, it takes alias1, column1, table2 and
 column2. Because of the way that left joins work, this method needs a
-table for the second field rather than merely an alias.  For this type
+table for the second column rather than merely an alias.  For this type
 of join, it will return the alias generated by the join.
 
 Instead of alias1/column1, it's possible to specify expression, to join
@@ -1143,37 +1143,6 @@
 
 }
 
-sub next_page {
-    my $self = shift;
-    $self->first_row( $self->first_row + $self->rows_per_page );
-}
-
-sub first_page {
-    my $self = shift;
-    $self->first_row(1);
-}
-
-sub prev_page {
-    my $self = shift;
-    if ( ( $self->first_row - $self->rows_per_page ) > 1 ) {
-        $self->first_row( $self->first_row - $self->rows_per_page );
-    }
-    else {
-        $self->first_row(1);
-    }
-}
-
-sub goto_page {
-    my $self = shift;
-    my $page = shift;
-
-    if ( $self->rows_per_page ) {
-        $self->first_row( 1 + ( $self->rows_per_page * $page ) );
-    }
-    else {
-        $self->first_row(1);
-    }
-}
 
 =head2 rows_per_page
 


More information about the Rt-commit mailing list