View Source Ash.Query.Function behaviour (ash v2.15.17)

A function is a predicate with an arguments list.

For more information on being a predicate, see Ash.Filter.Predicate. Most of the complexities are there. A function must meet both behaviours.

Summary

Callbacks

The number and types of arguments supported.

Functions

Attaches the appropriate suffix to refer to an ordinal number, e.g 1 -> "1st"

Types

Callbacks

@callback args() :: [arg()]

The number and types of arguments supported.

@callback evaluate(func :: map()) :: :unknown | {:known, term()}
@callback new([term()]) :: {:ok, term()} | {:error, String.t() | Exception.t()}
Link to this callback

partial_evaluate(func)

View Source (optional)
@callback partial_evaluate(func) :: func when func: map()
@callback private?() :: boolean()

Functions

Attaches the appropriate suffix to refer to an ordinal number, e.g 1 -> "1st"

Link to this function

try_cast_arguments(configured_args, args)

View Source