Re: [Neo4j] Re: uuid function

2017-11-30 Thread Kamal Murthy
Hi Koen, Here is a sample code with call apoc.do.case() procedure: MERGE (w:Winery {testval:1}) WITH w call apoc.do.case([w.testval=1, "SET w.a = 'bla1', w.b = 'bla2'", w.testval=2, "SET node.a = 'bla3', node.b = 'bla4'"], "SET node.a = 'bla5', node.b = 'bla6'", {w:w}) YIELD value RETURN w; Sy

Re: [Neo4j] Re: uuid function

2017-11-30 Thread Koen Kleingeld
Hi Kamal, thanks, i have seen this "construct" before and will test it. However i am still very interested to learn how to use the call apoc.do.case() procedure to implement this .. i expect that the result might look somewhat more straightforward (to say the least) i.. and ideas how to apply tha

Re: [Neo4j] Re: uuid function

2017-11-30 Thread Kamal Murthy
Hi Koen, Create a conditional statement by using FOREACH. If there’s a value for your condition then it loops once and set the property and if not no property will be set. MERGE (server:Server { name: line.`Machine Name`, uuid: call apoc.create.uuid() }) FOREACH(ignoreMe IN CASE WHEN testval=

Re: [Neo4j] Needing sample-graph for a utility network for, say, fresh-water distribution

2017-11-30 Thread Aron Olsen
Thank you Michael, I have been busy, so I appologize for my late response, I thought that the traditional network traversal and investigation problems would be "the catch", when talking about graph-databases. I am clearly off, on that point :) My background in networks is from electronics and la

Re: [Neo4j] Re: uuid function

2017-11-30 Thread Koen Kleingeld
Hi kamal. thanks, thats also how i do it now. Maybe one other question to the community Is there an example of a cypher query using a *call apoc.do.case()* procedure where you want to have multiple "condition,query" pairs and where each "query" performs multiple operations such as a property SET