TurnThePage v0.2.3 TurnThePage View Source
Fast, simple and lightweight pagination system for your Elixir application.
It works with queries and with lists. No magic applied.
Link to this section Summary
Functions
It paginates the query or the list using Ecto.Query functions in case of query and Stream / Enum functions for list and returns the query
Link to this section Functions
Link to this function
paginate(collection, opts \\ [])
View Source
paginate(Ecto.Query.t | [] | atom, [page: number, limit: number]) :: Ecto.Query.t
It paginates the query or the list using Ecto.Query functions in case of query and Stream / Enum functions for list and returns the query.
Parameters:
name of the module, query or list
opts
Possible options are:
page - by default 1
limit - by default 20
It returns Ecto.Query so to use is to have to apply at the end:
Repo.all()