Ecto query helpers for pagination
Add the paged_query
package to your list of dependencies in mix.exs
:
def deps do
[
{:paged_query, "~> 0.0.2"}
]
end
require Ecto.Query
import Ecto.Query
page = 0
page_size = 50
from(Blog)
|> PagedQuery.call(page, page_size)
|> Repo.all()
- Alex Kwiatkowski - alex+git@fremantle.io
paged_query
is released under the MIT license