Search documentation of ash

# Ash.Page.Offset (ash v3.4.71)

View Source

A page of results from `offset` based pagination.

If a resource supports `keyset` pagination as well, it will also have the `keyset` metadata.

# Summary

## Types

page_opts()
page_opts_opts()
page_opts_type()
t()

## Functions

new(results, count, original_query, more?, opts)

Creates a new `Ash.Page.Offset.t()`.

# Types

# page_opts()

    @type page_opts() :: [
      offset: page_opts_opts(),
      limit: page_opts_opts(),
      filter: page_opts_opts(),
      count: page_opts_opts()
    ]

# page_opts_opts()

    @type page_opts_opts() :: [type: page_opts_type(), doc: String.t()]

# page_opts_type()

    @type page_opts_type() :: :non_neg_integer | :pos_integer | :any | :boolean

# t()

    @type t() :: %Ash.Page.Offset{
      count: integer(),
      limit: integer(),
      more?: boolean(),
      offset: integer(),
      rerun: {Ash.Query.t(), Keyword.t()},
      results: [Ash.Resource.record()]
    }

# Functions

# new(results, count, original_query, more?, opts)

    @spec new(
      [Ash.Resource.record()],
      non_neg_integer(),
      Ash.Query.t(),
      boolean(),
      Keyword.t()
    ) :: t()

Creates a new `Ash.Page.Offset.t()`.