ash v0.13.1 Ash.Filter.Predicate behaviour View Source

Represents a filter predicate

Link to this section Summary

Link to this section Types

Specs

comparison() ::
  :unknown
  | :right_excludes_left
  | :left_excludes_right
  | :right_includes_left
  | :left_includes_right
  | :mutually_inclusive
  | {:simplify, term()}
  | {:simplify, term(), term()}

Specs

predicate() :: struct()

Specs

t() :: %Ash.Filter.Predicate{
  attribute: Ash.attribute(),
  predicate: predicate(),
  relationship_path: [atom()],
  resource: term(),
  value: term()
}

Link to this section Functions

Link to this function

add_inspect_path(inspect_opts, field)

View Source

Specs

compare(predicate(), predicate()) :: comparison()
Link to this function

match?(predicate, value, type)

View Source
Link to this function

new(resource, attribute, predicate, value, relationship_path)

View Source

Link to this section Callbacks

Link to this callback

compare(predicate, predicate)

View Source

Specs

compare(predicate(), predicate()) :: comparison()
Link to this callback

match?(predicate, term, arg3)

View Source

Specs

match?(predicate(), term(), Ash.Type.t()) :: boolean() | :unknown

Specs

new(Ash.resource(), Ash.attribute(), term()) ::
  {:ok, struct()} | {:error, term()}