Skip to main content

Change

Enum Change 

Source
pub enum Change {
Show 13 variants NodeCreated { id: NodeId, labels: LabelSet, properties: PropertyMap, }, NodeUpdated { id: NodeId, labels_diff: LabelDiff, properties_diff: PropertyDiff, }, NodeDeleted { id: NodeId, }, EdgeCreated { id: EdgeId, label: DbString, source: NodeId, target: NodeId, properties: PropertyMap, }, EdgeUpdated { id: EdgeId, properties_diff: PropertyDiff, }, EdgeDeleted { id: EdgeId, }, SchemaChanged { graph: GraphId, change: SchemaChange, }, NodePropertyRemoved { id: NodeId, property: DbString, }, EdgePropertyRemoved { id: EdgeId, property: DbString, }, NodeLabelRemoved { id: NodeId, label: DbString, }, NodesOfTypeTruncated { label: DbString, }, EdgesOfTypeTruncated { label: DbString, }, GraphReset {},
}
Expand description

A graph or schema change carried by the WAL.

Variants§

§

NodeCreated

Node creation.

Fields

§id: NodeId

Created node ID.

§labels: LabelSet

Initial labels.

§properties: PropertyMap

Initial properties.

§

NodeUpdated

Node update.

Fields

§id: NodeId

Updated node ID.

§labels_diff: LabelDiff

Label changes.

§properties_diff: PropertyDiff

Property changes.

§

NodeDeleted

Node deletion.

Fields

§id: NodeId

Deleted node ID.

§

EdgeCreated

Edge creation.

Fields

§id: EdgeId

Created edge ID.

§label: DbString

Edge label.

§source: NodeId

Source node ID.

§target: NodeId

Target node ID.

§properties: PropertyMap

Initial properties.

§

EdgeUpdated

Edge update.

Fields

§id: EdgeId

Updated edge ID.

§properties_diff: PropertyDiff

Property changes.

§

EdgeDeleted

Edge deletion.

Fields

§id: EdgeId

Deleted edge ID.

§

SchemaChanged

Schema mutation.

Fields

§graph: GraphId

Graph affected by the schema change.

§change: SchemaChange

Schema change payload.

§

NodePropertyRemoved

Node property removal.

Fields

§id: NodeId

Updated node ID.

§property: DbString

Removed property key.

§

EdgePropertyRemoved

Edge property removal.

Fields

§id: EdgeId

Updated edge ID.

§property: DbString

Removed property key.

§

NodeLabelRemoved

Node label removal.

Fields

§id: NodeId

Updated node ID.

§label: DbString

Removed label.

§

NodesOfTypeTruncated

Bulk removal of every node carrying label plus all incident edges.

This is the O(1)-WAL declarative truncate change (BRIEF-150, deletion- reclamation audit Item 11). It carries only the label — never the affected node/edge ids — so a TRUNCATE NODE TYPE :L of N nodes still writes exactly one WAL change. Recovery re-derives the affected rows by walking the recovered store (“replay walks store”), marking dead every alive node with label and every alive edge incident to such a node, so the recovered state is byte-identical to MATCH (n:L) DETACH DELETE n. Live commit fan-out substitutes the change with staged per-row NodeDeleted/EdgeDeleted tombstones when the mutator captured them during execution. WAL/recovery replay carries this persisted declarative variant, so provider-owned derived state must either handle it directly or rebuild from the recovered graph snapshot before serving reads.

Fields

§label: DbString

Node label whose instances (and incident edges) were removed.

§

EdgesOfTypeTruncated

Bulk removal of every edge carrying label.

The edge-type counterpart to Change::NodesOfTypeTruncated (TRUNCATE EDGE TYPE :L). Carries only the label (O(1) WAL); recovery re-derives the affected edges from the recovered store. Live commit fan-out substitutes the change with staged per-row EdgeDeleted tombstones when execution captured them; WAL/recovery replay carries this persisted declarative variant, so providers must handle it directly or rebuild before serving reads.

Fields

§label: DbString

Edge label whose instances were removed.

§

GraphReset

Factory-reset of the entire graph: wipe all nodes and edges (every label, including untyped/arbitrary-label rows) and reset the schema to open (bound_type -> None), in one declarative O(1)-WAL change.

This is the DROP GRAPH factory-reset change (BRIEF-152, deletion- reclamation audit Item 10). Under D1 single-graph it targets the one bound graph. It carries nothing — never the affected node/edge ids nor any schema payload — so a reset of a graph with N rows still writes exactly one WAL change. Recovery re-derives every affected row by walking the recovered store (“replay walks store”), marking dead every alive node and edge, and forces the recovered bound_type to None, so the recovered state is byte-identical to MATCH (n) DETACH DELETE n followed by a full schema drop. Live commit fan-out substitutes the change with staged per-row NodeDeleted/EdgeDeleted tombstones when execution captured them. WAL/recovery replay carries this persisted declarative variant, so providers must handle it directly or rebuild before serving reads. The MANIFEST epoch and WAL archive lineage are untouched: a factory-reset is one committed WAL entry on top of the existing snapshot, not a file-level wipe.

Implementations§

Source§

impl Change

Source

pub const fn kind(&self) -> ChangeKind

Return the compact kind discriminant for this change.

Source§

impl Change

Source

pub const ALL: &[fn() -> Self]

Factory table with one sample change for each Change variant.

Tests use this as an append-only ANCHOR so new WAL variants require a source-of-truth census update in selene-core.

Source

pub const VARIANT_COUNT: usize

Number of known Change variants in this build.

Source

pub fn variant_name(&self) -> &'static str

Stable telemetry name for this change variant.

Trait Implementations§

Source§

impl Clone for Change

Source§

fn clone(&self) -> Change

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Change

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Change

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Change

Source§

fn eq(&self, other: &Change) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Change

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Change

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.