Teng::Plugin::SearchBySQLWithPager - Teng plugin to add 'search_by_sql_with_pager' method
package MyApp::DB;
use parent 'Teng';
__PACKAGE__->load_plugin('SearchBySQLWithPager');
package main;
my $db = MyApp::DB->new(...);
my $page = $c->req->param('page') || 1;
my ($rows, $pager) = $db->search_by_sql_with_pager(
'SELECT id, name, type FROM user WHERE type = ?',
[ 3 ],
'user',
{ page => $page, rows => 5 },
);
Teng::Plugin::SearchBySQLWithPager is
Yuki Ibe <yibe at yibe dot org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.