WplAi.AST.Condition (WPL-AI v1.7.0)

Copy Markdown View Source

Rule condition (can be compound with AND/OR)

Summary

Types

comparison_op()

@type comparison_op() ::
  :eq | :neq | :gt | :gte | :lt | :lte | :contains | :not_contains

condition_type()

@type condition_type() :: :simple | :compound

logical_op()

@type logical_op() :: :and | :or

t()

@type t() :: %WplAi.AST.Condition{
  conditions: [t()] | nil,
  field: String.t() | nil,
  op: comparison_op() | nil,
  operator: logical_op() | nil,
  type: condition_type(),
  value: any() | nil
}