Forage.Paginator (forage v0.8.0)

Link to this section Summary

Functions

Build properly paginated Ecto queries from a set of parameters. Accepts :infinity as a limit.

Link to this section Functions

Link to this function

paginate(forage_plan_or_params, schema_or_query, repo, options, repo_opts \\ [])

@spec paginate(
  Forage.ForagePlan.t() | map(),
  atom() | Ecto.Query.t(),
  atom(),
  Keyword.t(),
  Keyword.t()
) ::
  map()

Build properly paginated Ecto queries from a set of parameters. Accepts :infinity as a limit.

Requires a repo with a paginate/2 function. The easiest way of having a compliant repo is to use Paginator, ... inside your Repo.

Link to this function

pagination_options(params, schema, options \\ [])