View Source Permit.Operators.DynamicQuery behaviour (permit_ecto v0.2.2)

Implemented to define a dynamic query builder function for an operator, that is a module that implements Permit.Operators.GenOperator.

For example, when an operator is defined in the Permit.Operators.Eq module, its dynamic query builder function should be defined in Permit.Operators.Eq.DynamicQuery.

Part of the private API, subject to changes and not to be used on the application level.

Link to this section Summary

Link to this section Callbacks

Link to this callback

dynamic_query_fn(struct_field, boolean)

View Source
@callback dynamic_query_fn(Permit.Types.struct_field(), boolean()) ::
  (any() ->
     %Ecto.Query.DynamicExpr{
       binding: term(),
       file: term(),
       fun: term(),
       line: term()
     })
  | nil