apoc.uuid.removeAll

存储过程 Apoc Extended 已弃用

CALL apoc.uuid.removeAll() yield label, installed, properties | 该过程用于移除所有先前添加的 uuid 处理程序,并返回 uuid 信息。所有现有的 uuid 属性将保持原样。

签名

apoc.uuid.removeAll() :: (label :: STRING?, installed :: BOOLEAN?, properties :: MAP?)

请注意,此存储过程已弃用。

请改用以下存储过程,它们在集群中提供更好的支持

已弃用的存储过程 新存储过程

apoc.uuid.install('<name>', $config)

apoc.uuid.setup('<name>', '<query>', '<dbName>', $config)

apoc.uuid.remove('<name>')

apoc.uuid.drop('<name>', '<dbName>')

apoc.uuid.removeAll()

apoc.uuid.removeAll('<dbName>')

其中 <dbName> 是我们想要执行自动 UUID 的数据库,默认值为 "neo4j"。

此过程不适用于集群环境,使用时可能会出现不可预期的行为。

输出参数

名称 类型

标签 (label)

STRING?

installed

布尔值?

属性

MAP?

启用自动 UUID

此存储过程属于一组通过 UUID 处理程序生命周期处理自动添加 UUID 属性的存储过程。UUID 处理程序是一个事务事件处理程序,它会自动为提供的标签和属性名称添加 UUID 属性。

默认情况下,自动添加 UUID 是禁用的。我们可以通过在 apoc.conf 中设置以下属性来启用它

apoc.conf
apoc.uuid.enabled=true

使用示例

我们可以通过运行以下查询来移除所有(由 apoc.uuid.install 安装的)UUID 处理程序

CALL apoc.uuid.removeAll();
表 1. 结果
标签 (label) installed 属性

"Person"

FALSE

{uuidProperty: "myUUID"}

如果我们尝试在没有安装任何 UUID 处理程序的情况下移除它们,输出将显示未移除任何处理程序

CALL apoc.uuid.removeAll();
表 2. 结果
标签 (label) installed 属性
© . This site is unofficial and not affiliated with Neo4j, Inc.