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

Overview

A page resulting from a pagination operation.

Included Modules

Defined in:

marten/db/query/page.cr
marten/template/ext/marten/db/query/page.cr

Constructors

Instance Method Summary

Macros inherited from module Marten::Template::CanDefineTemplateAttributes

template_attributes(*names) template_attributes

Constructor Detail

def self.new(records : Array(M), number : Int32, paginator : Paginator(M)) #

[View source]

Instance Method Detail

def count #

Returns the number of records in the page.


[View source]
def each(*args, **options) #

[View source]
def each(*args, **options, &) #

[View source]
def next_page? #

Returns true if there is a next page.


[View source]
def next_page_number #

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


[View source]
def number #

Returns the page number.


[View source]
def previous_page? #

Returns true if there is a previous page.


[View source]
def previous_page_number #

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


[View source]