触发器扩展过程

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

此外,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

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