exosql v0.2.74 ExoSQL.Expr View Source
Expression executor.
Requires a simplified expression from ExoSQL.Expr.simplify
that converts
columns names to column positions, and then use as:
iex> context = %{ row: [1,2,3,4,5] }
iex> expr = {:op, {"*", {:column, 1}, {:column, 2}}}
iex> ExoSQL.Expr.run_expr(expr, context)
6
Link to this section Summary
Functions
Unifies equal comparison
Unifies is greater comparison
Unifies greater or equal comparison
Try to return matching types
Simplify the column ids to positions on the list of columns, to ease operations
Link to this section Functions
Unifies equal comparison
Unifies is greater comparison
Unifies greater or equal comparison
Try to return matching types.
- If any is datetime, return datetimes
- If any is number, return numbers
- Otherwise, as is
Simplify the column ids to positions on the list of columns, to ease operations.
This operation is required to change expressions from column names to column
positions, so that ExoSQL.Expr
can perform its operations on rows.