cypher

neo4j cypher convert array/list to string

孤人 提交于 2020-12-12 06:57:02
问题 One type of edges in my graph has a property called roles . It is an array/list of strings. It is like ["Bill Smoke", "Haskell Moore", "Tadeusz Kesselring", "Nurse Noakes", "Boardman Mephi", "Old Georgie"] How can I convert this to a string? I want to join them. With JS, I can do ['asd', '1', '2'].join('') . I want a similar functionality inside cypher 回答1: WITH REDUCE(mergedString = "",word IN ["Bill Smoke", "Haskell Moore", "Tadeusz Kesselring", "Nurse Noakes", "Boardman Mephi", "Old

Excluding label names in simple Neo4j Query

僤鯓⒐⒋嵵緔 提交于 2020-12-04 15:26:13
问题 Usually I can find everything I need already on SO but not this time. I'm looking for a very simple way to exclude labels, for example (pseudo code) : match (n) where n not in (Label1, Label2) return n Sorry about crappy query. In short I have labels x,y,z and I want to return all of them apart from z. Thnx! 回答1: This should do it: MATCH (n) WHERE NOT n:Label1 AND NOT n:Label2 RETURN n; 来源: https://stackoverflow.com/questions/32817075/excluding-label-names-in-simple-neo4j-query

Excluding label names in simple Neo4j Query

强颜欢笑 提交于 2020-12-04 15:24:49
问题 Usually I can find everything I need already on SO but not this time. I'm looking for a very simple way to exclude labels, for example (pseudo code) : match (n) where n not in (Label1, Label2) return n Sorry about crappy query. In short I have labels x,y,z and I want to return all of them apart from z. Thnx! 回答1: This should do it: MATCH (n) WHERE NOT n:Label1 AND NOT n:Label2 RETURN n; 来源: https://stackoverflow.com/questions/32817075/excluding-label-names-in-simple-neo4j-query

Excluding label names in simple Neo4j Query

依然范特西╮ 提交于 2020-12-04 15:24:42
问题 Usually I can find everything I need already on SO but not this time. I'm looking for a very simple way to exclude labels, for example (pseudo code) : match (n) where n not in (Label1, Label2) return n Sorry about crappy query. In short I have labels x,y,z and I want to return all of them apart from z. Thnx! 回答1: This should do it: MATCH (n) WHERE NOT n:Label1 AND NOT n:Label2 RETURN n; 来源: https://stackoverflow.com/questions/32817075/excluding-label-names-in-simple-neo4j-query