Groups
Groups
Sign in
Groups
Groups
Neo4j
Conversations
About
Send feedback
Help
How to perform bulk operations in Cypher
79 views
Skip to first unread message
Johnny Luu
unread,
May 30, 2012, 3:34:02 AM
5/30/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Neo4j Google Groups
I usually have single operations like an addPicture query.
Instead of 10 Cypher requests when adding 10 pictures I want to have an addPictures query where I only make one HTTP request.
How do you loop a parameters value that is an array (consisting of the names of every picture I wanna add).
Here is my current addPicture query I wanna transform:
START root = node(0)
RELATE (root)-[:PICTURE]->(picture {name: {name}})
Johnny
Sent from my iPad
Michael Hunger
unread,
May 30, 2012, 3:35:57 AM
5/30/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ne...@googlegroups.com
> START root = node(0)
FOREACH (name in {names} : RELATE (root)-[:PICTURE]->(picture {name: name}) )
names being a parameter containing a list/array (Iterable) of name's.
Michael
Johnny Weng Luu
unread,
May 30, 2012, 4:10:00 AM
5/30/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ne...@googlegroups.com
Didn't know it could be used for parameter array values.
Nothing mentioned here:
http://docs.neo4j.org/chunked/milestone/query-foreach.html
I guess I just have to wait for
https://github.com/neo4j/community/issues/567
to be in the latest Heroku Neo4j version :)
Johnny
Reply all
Reply to author
Forward
0 new messages