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§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§impl Serialize for MutationEvent
impl Serialize for MutationEvent
impl StructuralPartialEq for MutationEvent
Auto Trait Implementations§
impl Freeze for MutationEvent
impl RefUnwindSafe for MutationEvent
impl Send for MutationEvent
impl Sync for MutationEvent
impl Unpin for MutationEvent
impl UnsafeUnpin for MutationEvent
impl UnwindSafe for MutationEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more