|| apoc.any.properties - APOC 核心文档 - Neo4j 文档

apoc.any.properties

详情

语法

apoc.any.properties(object [, keys ])

描述

返回给定对象的所有属性。该对象可以是虚拟 NODE、真实 NODE、虚拟 RELATIONSHIP、真实 RELATIONSHIPMAP

参数

名称

类型

描述

object

ANY

从中返回属性的对象。

keys

LIST<STRING>

要返回的属性的键(如果为 null 则返回所有键)。默认值为:null

返回

MAP

使用示例

本节示例基于以下图

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}

© . This site is unofficial and not affiliated with Neo4j, Inc.