Expres. [Deprecated] Please use the expreso lib instead
An Elixir library for parsing and evaluating SQL WHERE expressions
From Hex, the package can be installed as:
- Add
expres
to your list of dependencies inmix.exs
:
```elixir
def deps do
[{:expres, "~> 0.2.5"}]
end
```
Expres.evaluate(expression, variables)
Parses and evaluates the provided expression. The variables can be supplied as a map in the variables
parameter.
eg.
iex> Expres.evaluate("a + 2 in (3, 1)", %{"a" => 1})
iex> true