swirl_ql (swirl v0.2.8)

View Source

Summary

Types

boolean_op/0

-type boolean_op() :: 'and' | 'or'.

comparison_op/0

-type comparison_op() :: '<' | '<=' | '=' | '>=' | '>' | '<>'.

event/0

-type event() :: [{atom(), value()}].

exp_tree/0

-type exp_tree() ::
          {boolean_op(), exp_tree(), exp_tree()} |
          {comparison_op(), variable(), value()} |
          {inclusion_op(), variable(), [value(), ...]} |
          {null_op(), variable()}.

inclusion_op/0

-type inclusion_op() :: in | notin.

null_op/0

-type null_op() :: null | notnull.

value/0

-type value() :: integer() | float() | binary().

variable/0

-type variable() :: atom().

Functions

evaluate(_, Vars)

-spec evaluate(exp_tree(), event()) -> boolean().

parse(String)

-spec parse(string() | binary()) -> {ok, exp_tree()} | {error, term()}.