Fob.Cursor (Fob v0.7.0) View Source
A cursor data structure that can be used to fetch the next pages
The cursor data structure is somewhat similar to a Stream except that it
cannot wrap a stateful process and does not require any life-cycle hooks.
The next pages of data can be fetched by calling next/1 successively,
passing in the updated t/0 data structure each time.
Link to this section Summary
Link to this section Types
Specs
t() :: %Fob.Cursor{
page_breaks: Fob.page_breaks(),
page_size: pos_integer(),
query: Ecto.Query.t(),
repo: Ecto.Repo.t()
}
Link to this section Functions
Specs
new(Ecto.Queryable.t(), Ecto.Repo.t(), Fob.page_breaks(), pos_integer()) :: t()
Specs
Specs
split(cursor :: t(), count :: non_neg_integer()) :: {records :: [map()], cursor :: t()}