View Source Loupe.Stream.Comparator behaviour (Loupe v0.10.1)
Behaviour to implement comparator. It could be useful to implement your own comparator to alter how fields are getting compared.
Overriding the comparator can allow someone to implement
variant casting (exmaple field:upper
to uppercase values
automatically), alter the comparison logic or implement
sigil casting.
Link to this section Summary
Callbacks
Applies a field variant on a value. This can be used to have
expression like value:upper
be automatically uppercased.
Casts a sigil to kind of value to be compared.
Compares a stream's value with a literal value
Functions
Compares predicates inside a given map/structure tree
Link to this section Callbacks
Applies a field variant on a value. This can be used to have
expression like value:upper
be automatically uppercased.
Casts a sigil to kind of value to be compared.
@callback compare(Loupe.Language.Ast.operator()) :: boolean()
Compares a stream's value with a literal value
Link to this section Functions
@spec compare(Loupe.Language.Ast.predicate(), any(), Loupe.Stream.Context.t()) :: boolean()
Compares predicates inside a given map/structure tree