apoc.algo.cover
Syntax |
|
||
Description |
Returns all |
||
Input arguments |
Name |
Type |
Description |
|
|
The nodes to look for connected relationships on. |
|
Return arguments |
Name |
Type |
Description |
|
|
The relationships connected to the given nodes. |
Usage examples
The examples in this section are based on the following sample graph:
CREATE (Keanu:Person {name:'Keanu Reeves', born:1964})
CREATE (Carrie:Person {name:'Carrie-Anne Moss', born:1967})
CREATE (TomH:Person {name:'Tom Hanks', born:1956})
CREATE (Keanu)-[:KNOWS]->(Carrie);
CREATE (Tom)-[:KNOWS]->(Carrie);
match (p:Person)
WHERE p.name IN ["Keanu Reeves", "Carrie-Anne Moss"]
with collect(id(p)) as nodes
CALL apoc.algo.cover(nodes)
YIELD rel
RETURN startNode(rel), rel, endNode(rel);
startNode(rel) | rel | endNode(rel) |
---|---|---|
(:Person {name: "Keanu Reeves", born: 1964}) |
[:KNOWS] |
(:Person {name: "Carrie-Anne Moss", born: 1967}) |