View Source Quarto.Ecto.CursorFields (Quarto v1.1.7)

Derive the cursor fields from a given queryable

Link to this section Summary

Functions

build/2 accepts an Ecto.Query and inspects the Ecto AST to retrieve the fields the query will order by. These will be used to create the cursor.

Link to this section Types

Specs

direction() :: :asc | :desc

Specs

field() :: atom()

Specs

position() :: pos_integer()

Link to this section Functions

Link to this function

build(queryable, config)

View Source

Specs

build(queryable :: Ecto.Query.t(), config :: Keyword.t()) :: [
  {field(), {position(), direction()}}
]

build/2 accepts an Ecto.Query and inspects the Ecto AST to retrieve the fields the query will order by. These will be used to create the cursor.