View Source ScrollexEcto.Page (ScrollexEcto v0.1.0)

Represents a page of results from a paginated query.

This struct is returned by the ScrollexEcto.Paginator.paginate/4 function.

Summary

Types

t()

Type specification for the ScrollexEcto.Page struct.

Types

@type t() :: %ScrollexEcto.Page{
  entries: [any()],
  next_cursor: String.t() | nil,
  page_number: integer() | nil,
  page_size: integer(),
  total_entries: integer() | nil,
  total_pages: integer() | nil
}

Type specification for the ScrollexEcto.Page struct.

Fields:

  • :entries - List of items on the current page
  • :page_number - Current page number (for offset-based pagination)
  • :page_size - Number of items per page
  • :total_pages - Total number of pages (for offset-based pagination)
  • :total_entries - Total number of items across all pages (for offset-based pagination)
  • :next_cursor - Cursor for the next page (for cursor-based pagination)