pub enum MutationEvent {
Show 16 variants
CreateNode {
id: NodeId,
labels: Vec<String>,
properties: Properties,
},
CreateRelationship {
id: RelationshipId,
src: NodeId,
dst: NodeId,
rel_type: String,
properties: Properties,
},
SetNodeProperty {
node_id: NodeId,
key: String,
value: PropertyValue,
},
RemoveNodeProperty {
node_id: NodeId,
key: String,
},
AddNodeLabel {
node_id: NodeId,
label: String,
},
RemoveNodeLabel {
node_id: NodeId,
label: String,
},
SetRelationshipProperty {
rel_id: RelationshipId,
key: String,
value: PropertyValue,
},
RemoveRelationshipProperty {
rel_id: RelationshipId,
key: String,
},
DeleteRelationship {
rel_id: RelationshipId,
},
DeleteNode {
node_id: NodeId,
},
DetachDeleteNode {
node_id: NodeId,
},
Clear,
CreateIndex {
request: IndexRequest,
if_not_exists: bool,
},
DropIndex {
name: String,
if_exists: bool,
},
CreateConstraint {
request: ConstraintRequest,
if_not_exists: bool,
},
DropConstraint {
name: String,
if_exists: bool,
},
}Expand description
A durable, replayable mutation against a graph store.
Each variant mirrors a method on GraphStorageMut. Applying every event
in order against a store initialised from the snapshot whose wal_lsn
immediately precedes the first event reproduces the committed state.
The enum derives Serialize/Deserialize for non-WAL observers and
tooling; the production WAL uses its own compact tagged codec.
Variants§
CreateNode
Fields
id: NodeIdId the backend allocated for the new node. Captured so replay
against a clean store produces the same id assignment as the
original (next_node_id advances deterministically).
properties: PropertiesCreateRelationship
SetNodeProperty
RemoveNodeProperty
AddNodeLabel
RemoveNodeLabel
SetRelationshipProperty
RemoveRelationshipProperty
DeleteRelationship
Fields
rel_id: RelationshipIdDeleteNode
DetachDeleteNode
Clear
CreateIndex
Catalog-level mutation: register an index in the catalog. Replay
re-applies via the same register_index path with the recorder
detached, so events do not duplicate themselves.
DropIndex
Catalog-level mutation: drop an index by name.
CreateConstraint
Catalog-level mutation: register a constraint in the catalog.
DropConstraint
Catalog-level mutation: drop a constraint by name. The store cascades to the backing index when the constraint owned one.
Trait Implementations§
Source§impl Clone for MutationEvent
impl Clone for MutationEvent
Source§fn clone(&self) -> MutationEvent
fn clone(&self) -> MutationEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MutationEvent
impl Debug for MutationEvent
Source§impl<'de> Deserialize<'de> for MutationEvent
impl<'de> Deserialize<'de> for MutationEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MutationEvent
impl PartialEq for MutationEvent
Source§fn eq(&self, other: &MutationEvent) -> bool
fn eq(&self, other: &MutationEvent) -> bool
self and other values to be equal, and is used by ==.