QueryPaginationInput
public struct QueryPaginationInput
A simple struct that holds pagination information that can be applied queries.
-
The default page size.
Declaration
Swift
public static let defaultLimit: UInt
-
The page number. It starts at 0.
Declaration
Swift
public let page: UInt
-
The number of results per page.
Declaration
Swift
public let limit: UInt
-
Creates a
QueryPaginationInput
in an expressive way, enabling a short and developer friendly access to an instance ofQueryPaginationInput
.Declaration
Swift
public static func page(_ page: UInt, limit: UInt = QueryPaginationInput.defaultLimit) -> QueryPaginationInput
Parameters
page
the page number (starting at 0)
limit
the page size (defaults to
QueryPaginationInput.defaultLimit
)Return Value
a new instance of
QueryPaginationInput