class

Marten::DB::Query::Page(M)

Inherits Marten::Template::Object / Marten::Template::CanDefineTemplateAttributes / Enumerable / Reference / Object

A page resulting from a pagination operation.

Constructors

new(records : Array(M), number : Int32, paginator : Paginator(M))
Source

Instance methods

count

Returns the number of records in the page.

Source
each(*args, **options)
Source
each(*args, **options, &)
Source
next_page?

Returns true if there is a next page.

Source
next_page_number

Returns the next page number, or nil if there is no next page.

Source
number

Returns the page number.

Source
pages_count

Returns the total number of pages.

Source
previous_page?

Returns true if there is a previous page.

Source
previous_page_number

Returns the previous page number, or nil if there is no previous page.

Source
total_count

Returns the total number of records in the queryset, without applying pagination.

Source