Ash.Query.Operator.new

You're seeing just the callback new, go back to Ash.Query.Operator module for more information.

Specs

new(term(), term()) ::
  {:ok, term(), term()} | {:ok, term()} | {:known, boolean()} | {:error, term()}

Create a new predicate. There are various return types possible:

  • {:ok, left, right} - Return the left/right values of the operator
  • {:ok, operator} - Return the operator itself, this or the one above are acceptable
  • {:known, boolean} - If the value is already known, e.g 1 == 1
  • {:error, error} - If there was an error creating the operator