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.

+3


source to share


1 answer


  • (n)-[r]-()

    means that you don't care about the direction of the relationship r

    .

  • (n)-[r]->(m)

    means that the relation r

    should be directed from n

    to m

    .

  • (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 example r

    ).



You can read the documentation for more information.

+7


source







All Articles