ash v1.27.0 Ash.Query.Function behaviour View Source
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.
Link to this section Summary
Functions
Attaches the appropiate suffix to refer to an ordinal number, e.g 1 -> "1st"
Link to this section Types
Specs
arg() :: :ref | :term | {:options, Keyword.t()}
Link to this section Functions
Attaches the appropiate suffix to refer to an ordinal number, e.g 1 -> "1st"
Link to this section Callbacks
Specs
args() :: [arg()]
The number and types of arguments supported.
Currently supports three values: :ref
, :term
, and {:options, schema}
.
:ref
- a column/relationship path reference. Will be an instance ofAsh.Query.Ref
:term
- any value. No type validation is currently supported except for what is listed here, so it must be done in thenew/1
function{:options, keys}
- Only the last arg may be options, andkeys
is a list of atoms for which options are accepted