|| apoc.meta.cypher.types - APOC 核心文档 - Neo4j 文档

apoc.meta.cypher.types

详情

语法

apoc.meta.cypher.types(props)

描述

返回一个 MAP 包含给定值的类型名称。

参数

名称

类型

描述

props

任意类型

用于获取属性类型的关系、节点或映射。

返回

MAP

使用 Cypher 检查类型

Cypher 无需使用 APOC 即可检查类型。

检查类型的 Cypher 语法
RETURN valueType(1.0);

更多信息请参阅 Cypher 手册 → 值类型函数

使用示例

使用映射输入调用该函数将返回一个具有相同键的映射,其中每个键的值是其在输入映射中的值的类型

RETURN apoc.meta.cypher.types({
  item1: 2,
  item2: datetime(),
  item3: "Michael"
}) AS output;
结果
输出

{item2: "DATE_TIME", item1: "INTEGER", item3: "STRING"}

使用空映射调用该函数将返回一个空映射

RETURN apoc.meta.cypher.types({}) AS output;
结果
输出

{}

使用非映射的输入值调用该函数将返回一个空映射

RETURN apoc.meta.cypher.types(1) AS output;
结果
输出

{}

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