Dissolver v0.9.4 Dissolver.Paginator View Source

This module is responsible for building the struct used for navigating to the respective pages of a given query

The HTML and JSON view helper will call into this module calling the paginate/3 passing the Plug.Conn, along with a Hydrated version of this struct.

Link to this section Summary

Link to this section Types

Link to this type


View Source
t() :: %Dissolver.Paginator{
  lazy: boolean(),
  max_count: integer(),
  max_page: integer(),
  max_per_page: integer(),
  page: integer(),
  params: map(),
  per_page: integer(),
  theme: Dissolver.HTML.Theme.t(),
  total_count: integer(),
  total_pages: integer()

Link to this section Functions

Link to this function


View Source
build_options(keyword()) :: keyword()
Link to this function

paginate(conn, paginator, opts \\ [])

View Source
paginate(Plug.Conn.t(), t(), nil | maybe_improper_list() | map()) :: list()