The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DBIx::Skinny::Pager::Logic::PlusOne

SYNOPSIS

  package Proj::DB;
  use DBIx::Skinny;

  package main;
  use Proj::DB;

  my $rs = Proj::DB->resultset_with_pager('PlusOne');
  # $rs can handle like DBIx::Skinny::SQL.
  $rs->from(['some_table']);
  $rs->add_where('foo' => 'bar');
  $rs->limit(10);
  $rs->offset(20);
  my ($iter, $pager) = $rs->retrieve;
  # $iter is a DBIx::Skinny::Iterator
  # $pager is a DBIx::Skinny::Pager::Page::PlusOne.

DESCRIPTION

DBIx::Skinny::Pager::Logic::PlusOne will take limit + 1 record and you can decide next page is exist or not. This logic is good at performance. But, you can't know total records. So, if you want to switch view speedy, see pager class.

AUTHOR

Keiji Yoshimi <walf443 at gmail dot com>

SEE ALSO

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.