neogma
neogma copied to clipboard
match on create does not seem to be able to be created with the QueryBuilder
I could be wrong but there does not seem to be a way to build an ON CREATE query like this
MERGE (keanu:Person {name: 'Keanu Reeves'})
ON CREATE
SET keanu.created = timestamp()
RETURN keanu.name, keanu.created
This example taken from the Neo4j Docs
Correct. This cannot be built by using only build-in operators, but it can be built by using raw
.
For example:
.merge(...)
.raw(`ON CREATE SET keanu.created = timestamp()`)
.return([...]);
Good to know thats better then just using raw but would be good to be able to use native