View Source Loupe.Ecto (Loupe v0.3.0)
Entrypoint module for Ecto related function with Loupe. Ideally, this module should be completely decoupled from any Repo logic and leave that to the app's Repo
Link to this section Summary
Functions
Same as build_query/2 but with context or with implementation with no assigns
Builds an Ecto query from either an AST or a string. It requires an implementation of the Loupe.Ecto.Definition behaviour and supports assigns as a third parameter.
Link to this section Functions
@spec build_query( binary(), Loupe.Ecto.Context.implementation() | Loupe.Ecto.Context.t() ) :: {:ok, Ecto.Query.t(), Loupe.Ecto.Context.t()} | {:error, atom()}
Same as build_query/2 but with context or with implementation with no assigns
@spec build_query(binary(), Loupe.Ecto.Context.implementation(), map()) :: {:ok, Ecto.Query.t(), Loupe.Ecto.Context.t()} | {:error, atom()}
Builds an Ecto query from either an AST or a string. It requires an implementation of the Loupe.Ecto.Definition behaviour and supports assigns as a third parameter.