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 of QueryPaginationInput.

    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

  • Utility that created a QueryPaginationInput with page 0 and limit 1

    Declaration

    Swift

    public static var firstResult: QueryPaginationInput { get }
  • Utility that created a QueryPaginationInput with page 0 and the default limit

    Declaration

    Swift

    public static var firstPage: QueryPaginationInput { get }