apoc.any.properties
语法 |
|
||
描述 |
返回给定对象的所有属性。该对象可以是虚拟 |
||
参数 |
名称 |
类型 |
描述 |
|
|
从中返回属性的对象。 |
|
|
|
要返回的属性的键(如果为 null 则返回所有键)。默认值为: |
|
返回 |
|
||
使用示例
本节示例基于以下图
CREATE (s:Student {name: 'Alice', score: 71});
CREATE (s:Student {name: 'Mark', score: 95});
CREATE (s:Student {name: 'Andrea', score: 86});
CREATE (s:Student {name: 'Rajesh', score: 89});
CREATE (s:Student {name: 'Jennifer', score: 96});
CREATE (s:Student {name: 'Katarina', score: 80});
如果我们创建包含学生分数的虚拟节点,可以使用 apoc.any.properties 返回这些虚拟节点的属性
MATCH (s:Student)
CALL apoc.create.vNode(['Score'],{value: s.score})
YIELD node
RETURN apoc.any.properties(node) AS properties;
| 属性 |
|---|
{value: 71} |
{value: 95} |
{value: 86} |
{value: 89} |
{value: 96} |
{value: 80} |