View Source Loupe.Ecto (Loupe v0.9.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 Types
@type build_query_error() :: any()
Link to this section Functions
@spec build_query( Loupe.Language.Ast.t() | binary(), Loupe.Ecto.Context.implementation() | Loupe.Ecto.Context.t() ) :: {:ok, Ecto.Query.t(), Loupe.Ecto.Context.t()} | {:error, build_query_error()}
Same as build_query/2 but with context or with implementation with no assigns
Link to this function
build_query(string_or_ast, implementation, assigns, variables \\ %{})
View Source@spec build_query( Loupe.Language.Ast.t() | binary(), Loupe.Ecto.Context.implementation(), map(), map() ) :: {:ok, Ecto.Query.t(), Loupe.Ecto.Context.t()} | {:error, build_query_error()}
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.