NAME
Aniki::Plugin::SQLPager - SELECT sql with pager
SYNOPSIS
package MyDB;
use Mouse v2.4.5;
extends qw/Aniki/;
with qw/Aniki::Plugin::Pager/;
package main;
my $db = MyDB->new(...);
my $result = $db->select_by_sql_with_pager('SELECT * FROM user WHERE type = ?', [ 2 ], { page => 1, rows => 10 }); # => Aniki::Result::Collection(+Aniki::Result::Role::Pager)
# ALSO OK: my $result = $db->select_named_with_pager('SELECT * FROM user WHERE type = :type', { type => 2 }, { page => 1, rows => 10 }); # => Aniki::Result::Collection(+Aniki::Result::Role::Pager)
$result->pager; # => Data::Page::NoTotalEntries
SEE ALSO
LICENSE
Copyright (C) karupanerura.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
karupanerura <karupa@cpan.org>