Forage.Paginator (forage v0.5.0)

Link to this section Summary

Link to this section Functions

Link to this function

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

Specs

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.

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 \\ [])