-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neo4J MERGE support #10
Comments
why not, |
For nodes:
For relationships:
Btw. documentation for |
How would I pass a label? |
The same way as create
|
Hmm, how about something like this:
Then a DSL for merge on multiple relationship would be similar: Example:
generates cypher:
|
I don't think matches should be nested in merge, because they are in no way local to it. On the other hand on_create and on_match make sense only in context of merge. Probably following makes more sense:
And for nodes:
which is the same as:
So generally merge could accept either node or relationship to match, and the on_match and on_create could be defined in block or chained syntax. |
Even better:
|
That is actually the same as
except that the names of the nodes (oliver and rob is generated for you). |
In your case marge expects block it's yielding to return matched relation. I think it makes more sense to accept this relation as argument. For example it's rather unclear that in example below second match is passed to merge while first match is free-standing.
When using nested match, you cannot support multiple matches anyway, so what's the advantage? I'm not sure about this. |
I fixed syntax, but probably it's messed up anyway. I'm no expert in neo4j-cypher. |
MERGE is introduced in Neo4j 2. Will this gem support it?
The text was updated successfully, but these errors were encountered: