What is the difference between -, & # 8594; and & # 8594; when requested using Cypher (Neo4j)
I've seen various variations of "link" in Cypher, for example:
-
match (n)-[r]-() delete, n, r
-
merge (n) -[:TO {dist:line.distance}] -> (m)
-
match (n:MyNode)-[r:TO]->(m) where not ((m)-->())
where these links can be assigned using 1) "-", 2) "->" 3) "->", I was wondering what the difference is between these three types. In these different contexts, I see they are used in different ways, but wondered if there is a general rule for understanding this.
source to share
-
(n)-[r]-()
means that you don't care about the direction of the relationshipr
. -
(n)-[r]->(m)
means that the relationr
should be directed fromn
tom
. -
(n)-->(m)
means that you do not want to qualify the relationship template (for example, specify the type) and do not receive any data from the relationship via an identifier (for exampler
).
You can read the documentation for more information.
source to share