EctoCursor

This is an experimental library for cursor (keyset) based pagination for Ecto. How is this different from other libraries:

It's not ready for general use in production. It relies on AST analysis of the queries, and it will most likely crash on many complex queries. I this happened to you, I will apreciate the example of query with schema in issues. Thank you!

Usage

defmodule Repo do
  use Ecto.Repo, ....opts
  use EctoCursor
end

Repo.paginate(query, %{cursor: str, limit: int, max_limit: int})

To do

Installation

If available in Hex, the package can be installed by adding ecto_cursor to your list of dependencies in mix.exs:

def deps do
  [
    {:ecto_cursor, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ecto_cursor.