触发器扩展过程

APOC Core 提供了一组过程,用于运行在 Neo4j 数据发生变化(创建、更新、删除)时调用的 Cypher 查询。

此外,APOC Extended 提供了一些辅助过程,可以更轻松地操作 Cypher 查询,并解决一些无法以其他方式解决的事务用例。

辅助函数

限定名称 类型 发布

apoc.trigger.nodesByLabel

apoc.trigger.nodesByLabel(labelEntries, label) - 用于按标签过滤 labelEntries 的函数,可在使用 $assignedLabels$removedLabels$assigned/removedNodeProperties 的触发器 kernelTransaction 中使用。

函数

Apoc Extended

apoc.trigger.propertiesByKey

apoc.trigger.propertiesByKey(propertyEntries, key) - 用于按属性键过滤 propertyEntries 的函数,可在使用 $assignedNode/RelationshipProperties$removedNode/RelationshipProperties 的触发器 kernelTransaction 中使用。返回 [old,new,key,node,relationship]。

函数

Apoc Extended

apoc.trigger.toNode

apoc.trigger.toNode(node, removedLabels, removedNodeProperties) - 用于将节点重建为虚拟节点的函数,可在非 'afterAsync' 阶段的触发器中使用。

函数

Apoc Extended

apoc.trigger.toRelationship

apoc.trigger.toRelationship(rel, removedRelationshipProperties) - 用于将关系重建为虚拟关系的函数,可在非 'afterAsync' 阶段的触发器中使用。

函数

Apoc Extended

© . All rights reserved.