apoc.get.nodes
过程 Apoc 扩展
apoc.get.nodes(node|id|[ids]) - 快速返回具有这些 ID 的所有节点
用法示例
本节中的示例基于以下图数据
CREATE (:Student {name: 'Alice', score: 71});
CREATE (:Student {name: 'Mark', score: 95});
CREATE (:Student {name: 'Andrea', score: 86});
我们可以使用 id 函数返回这些节点的内部 ID
MATCH (s:Student)
RETURN id(s) AS id;
| id |
|---|
3975 |
3976 |
3977 |
CALL apoc.get.nodes([3975, 3976, 3977]);
| 节点 |
|---|
(:Student {name: "Alice", score: 71}) |
(:Student {name: "Mark", score: 95}) |
(:Student {name: "Andrea", score: 86}) |