AntlUtilsEcto.Paginator (antl_utils_ecto v2.10.1) View Source
Set of utils for Ecto about Pagination
Link to this section Summary
Link to this section Functions
Specs
paginate(any(), pos_integer(), pos_integer()) :: Ecto.Query.t()
Paginate.
Examples
iex> queryable = from u in "products" #Ecto.Query<from p0 in "products"> iex> Paginator.paginate(queryable, 100, 1) #Ecto.Query<from p0 in "products", limit: ^100, offset: ^0> iex> Paginator.paginate(queryable, 100, 2) #Ecto.Query<from p0 in "products", limit: ^100, offset: ^100> iex> Paginator.paginate(queryable, 100, 3) #Ecto.Query<from p0 in "products", limit: ^100, offset: ^200> iex> Paginator.paginate(queryable, 10, 3) #Ecto.Query<from p0 in "products", limit: ^10, offset: ^20>