Closed g3rd closed 6 years ago
Great catch. This was something that I was meaning to implement, but has completely feel off of my radar.
It would be pretty easy to add support for setting a dict in python and returning the curly brace-structure in cypher. However, I remember seeing an example that looked something like RETURN {.name}
and I not too sure how to handle it.
If we start with something like:
p.SET.u += {'name': 'some name', 'age' 999}
What does that look like in cypher? Is it SET u += {'name': $name_var, 'age': $age_var}
or something different? And what are the other permutations of that dict-like structure in cypher that we'd need to account for in python?
It isn't too difficult to add, I just want to make sure we get it right. I will check the documentation for more examples. Please drop some links if you have any.
Thanks
Edit: I found the map projections page in the documentation. I will work on adding this: https://neo4j.com/docs/developer-manual/current/cypher/syntax/maps/
The two examples above I currently write out by hand and then run through the neo4j-driver
I'll have updates for full map support tonight. Both in setting a node/relationship's properties and other usage in Cypher queries.
This latest release should be what you're looking for.
https://github.com/emehrkay/Pypher#operators
I'm going to push to pypi soon
Addressed with version 0.7.0
@emehrkay thanks!
Hello,
First off, thanks for this project. I started to write one today. Then stumbled upon this, and stopped mine.
How would I write:
or
Thanks again!