Forage.ForagePlan (forage v0.5.0)

A forage plan, which can be used to run paginated queries on your repo.

It contains 3 parts:

  • :filter - a list of filters for the plan. They will be converted into Ecto where clauses
  • :sort - a list of fields to use when sorting They will be converted into Ecto oerder_by clauses.
  • :pagination - data related to pagination of entries. Forage uses Paginator under the hood to implement cursor-based pagination, which is more efficient than the naïve offset-based pagination for medium/large datasets.

Link to this section Summary

Link to this section Types


t() :: %Forage.ForagePlan{filter: term(), pagination: term(), sort: term()}