Add docs in various places to point out how to get the total count of rows for a...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Manual / FAQ.pod
index 273397a..7d4505e 100644 (file)
@@ -274,7 +274,7 @@ replaced with the following.)
 
 Or, if you have quoting off:
 
- ->search({ 'YEAR(date_of_birth' => 1979 });
+ ->search({ 'YEAR(date_of_birth)' => 1979 });
 
 =item .. find more help on constructing searches?
 
@@ -353,6 +353,20 @@ to get a new, fresh copy of the row, just re-fetch the row from storage.
 L<DBIx::Class::PK/discard_changes> does just that by re-fetching the row from storage
 using the row's primary key.
 
+=item .. fetch my data a "page" at a time?
+
+Pass the C<rows> and C<page> attributes to your search, eg:
+
+  ->search({}, { rows => 10, page => 1});
+
+=item .. get a count of all rows even when paging?
+
+Call C<pager> on the paged resultset, it will return a L<Data::Page>
+object. Calling C<total_entries> on the pager will return the correct
+total.
+
+C<count> on the resultset will only return the total number in the page.
+
 =back
 
 =head2 Inserting and updating data