blib/lib/Class/DBI/Plugin/Pager/LimitOffset.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 13 | 13 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 17 | 18 | 94.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Class::DBI::Plugin::Pager::LimitOffset; | ||||||
2 | 2 | 2 | 949 | use strict; | |||
2 | 21 | ||||||
2 | 95 | ||||||
3 | 2 | 2 | 12 | use warnings; | |||
2 | 4 | ||||||
2 | 74 | ||||||
4 | |||||||
5 | 2 | 2 | 13 | use base 'Class::DBI::Plugin::Pager'; | |||
2 | 4 | ||||||
2 | 931 | ||||||
6 | |||||||
7 | sub make_limit { | ||||||
8 | 2 | 2 | 0 | 3 | my ( $self ) = @_; | ||
9 | |||||||
10 | 2 | 13 | my $offset = $self->skipped; | ||||
11 | 2 | 147 | my $rows = $self->entries_per_page; | ||||
12 | |||||||
13 | 2 | 25 | return "LIMIT $rows OFFSET $offset"; | ||||
14 | } | ||||||
15 | |||||||
16 | 1; | ||||||
17 |