add relationship cypher querries.

This commit is contained in:
2025-03-09 23:08:03 +01:00
parent 5e1074571d
commit bbbdedec9f
3 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
MATCH (a:Person), (b:Person)
WHERE a.id = $id1 AND b.id = $id2
CREATE (a)-[r:Relationship $Relationship]->(b)
RETURN r as relationship

View File

@@ -0,0 +1,4 @@
MATCH (a:Person), (b:Person)
WHERE a.id = $id1 AND b.id = $id2
CREATE (a)-[r:Relationship $Relationship]-(b)
RETURN r as relationship

View File

@@ -0,0 +1,5 @@
MATCH (a:Person), (b:Person)
WHERE a.id = $id1 AND b.id = $id2
CREATE (a)-[r1:Relationship $Relationship1]->(b)
CREATE (b)-[r2:Relationship $Relationship2]->(a)
RETURN r1 as relationship1, r2 as relationship2