Expression
s are used to define filter logic for passing to a Dataset
Scanner.
Expression$scalar(x)
constructs an Expression
which always evaluates to
the provided scalar (length-1) R value.
Expression$field_ref(name)
is used to construct an Expression
which
evaluates to the named column in the Dataset
against which it is evaluated.
Expression$compare(OP, e1, e2)
takes two Expression
operands, constructing
an Expression
which will evaluate these operands then compare them with the
relation specified by OP (e.g. "==", "!=", ">", etc.) For example, to filter
down to rows where the column named "alpha" is less than 5:
Expression$compare("<", Expression$field_ref("alpha"), Expression$scalar(5))
Expression$and(e1, e2)
, Expression$or(e1, e2)
, and Expression$not(e1)
construct an Expression
combining their arguments with Boolean operators.
Expression$is_valid(x)
is essentially (an inversion of) is.na()
for Expression
s.
Expression$in_(x, set)
evaluates x and returns whether or not it is a member of the set.