|
NAMETeng::Plugin::Pager - Pager SYNOPSIS package MyApp::DB;
use parent qw/Teng/;
__PACKAGE__->load_plugin('Pager');
package main;
my $db = MyApp::DB->new(dbh => $dbh);
my $page = $c->req->param('page') || 1;
my ($rows, $pager) = $db->search_with_pager('user' => {type => 3}, {page => $page, rows => 5});
DESCRIPTIONThis is a helper for pagination. This pager fetches "entries_per_page + 1" rows. And detect "this page has a next page or not". METHODS
This method returns ArrayRef[Teng::Row] and instance of Data::Page::NoTotalEntries.
|