Features
- Add support to variable binding inside
cypher
macro. Now external variables (including maps) can be resolved within cypher macro:
person = %{name: "bob", age: 12}
cypher do
match(node([:Person], %{name: person.name, age: person.age}))
end
- Expand support to other comparison operators inside
WHERE
statements. Now, besides the common elixir comparison operators (!=
,<
,>
,<=
,>=
), the equality operator was replaced by the elixir one (==
) - Added support to
SET
statements within queries:
# SET usage example:
cypher do
match(node(:p, [:Person], %{name: "Andy"}))
set(p.name = "Bob")
return(p.name)
end
"MATCH (p:Person {name:\"Andy\"}) SET p.name = \"Bob\" RETURN p.name"
- Added support to variable aliasing:
# Cypher aliasing example
cypher do
match(node(:n))
pipe_with({:n, as: :p})
end
# "MATCH (n) WITH n AS p" = query
Check full documentation to see the command's usage.
Improvements
- Ensure support for elixir 1.8.2, 1.9.4 and 1.10.0
- Add integration specs into CI pipelines - this'll ensure correctness in excypher generated queries
Fixes
- Replaced
=
equality operator with elixir's one (==
)