pub struct TriggerDiff {
pub created_nodes: Vec<Node>,
pub created_relationships: Vec<Edge>,
pub deleted_nodes: Vec<Node>,
pub deleted_relationships: Vec<Edge>,
pub assigned_node_properties: Vec<PropertyChange>,
pub removed_node_properties: Vec<PropertyChange>,
pub assigned_relationship_properties: Vec<PropertyChange>,
pub removed_relationship_properties: Vec<PropertyChange>,
pub assigned_labels: Vec<LabelChange>,
pub removed_labels: Vec<LabelChange>,
}Expand description
Per-tx diff handed to a trigger as $created* / $deleted* /
$assigned* / $removed* params. Computed in meshdb-rpc
(where GraphCommand lives) and passed in to the firing
helpers. into_param_map shapes the lists into Neo4j APOC’s
expected param surface.
Fields§
§created_nodes: Vec<Node>§created_relationships: Vec<Edge>§deleted_nodes: Vec<Node>§deleted_relationships: Vec<Edge>§assigned_node_properties: Vec<PropertyChange>§removed_node_properties: Vec<PropertyChange>§assigned_relationship_properties: Vec<PropertyChange>§removed_relationship_properties: Vec<PropertyChange>§assigned_labels: Vec<LabelChange>§removed_labels: Vec<LabelChange>Implementations§
Source§impl TriggerDiff
impl TriggerDiff
Sourcepub fn clone_diff(&self) -> Self
pub fn clone_diff(&self) -> Self
Deep-clone the diff. Used by call sites that need to fan
the same diff out to multiple firing phases (e.g.
after-sync + afterAsync) since into_param_map consumes
self.
Sourcepub fn into_param_map(self, extra: &HashMap<String, Property>) -> ParamMap
pub fn into_param_map(self, extra: &HashMap<String, Property>) -> ParamMap
Convert the diff into a ParamMap suitable for
passing to execute_with_reader_and_procs. The keys
match what Neo4j APOC’s trigger system exposes:
createdNodes / createdRelationships /
deletedNodes / deletedRelationships (lists),
assignedNodeProperties / removedNodeProperties /
assignedRelationshipProperties /
removedRelationshipProperties (lists of
{key, old, new, node|relationship} maps), and
assignedLabels / removedLabels (lists of
{label, node} maps).