Skip to main content

RedoOp

Enum RedoOp 

Source
pub enum RedoOp {
Show 23 variants CreateNode { id: i64, labels: Arc<Vec<String>>, properties: Arc<PropertyMap>, }, CreateRel { id: i64, start: i64, end: i64, rel_type: String, properties: Arc<PropertyMap>, }, DeleteNode { id: i64, }, DeleteRel { id: i64, }, SetNodeProp { id: i64, key: String, value: Value, }, RemoveNodeProp { id: i64, key: String, }, SetRelProp { id: i64, key: String, value: Value, }, RemoveRelProp { id: i64, key: String, }, AddLabels { id: i64, labels: Vec<String>, }, RemoveLabels { id: i64, labels: Vec<String>, }, CreateIndex { name: String, label: String, property: String, }, DropIndex { name: String, }, CreateConstraint { name: String, relationship: bool, label: String, properties: Vec<String>, kind: String, property_type: Option<String>, enforced_label: Option<String>, }, DropConstraint { name: String, }, CatalogIndexDetail { name: String, detail: IndexDetailSpec, options: Value, }, CatalogDerivedConstraint { constraint: Constraint, }, PutDatabase { name: String, language: u32, composite: bool, }, DropDatabase { name: String, }, PutGraphType { name: String, body: GraphTypeSpec, }, SetCurrentGraphType { body: GraphTypeSpec, }, PullIdentityPut { source: String, kind: PullKind, remote_id: String, local_id: i64, }, OntologySet { database: String, spec: String, }, OntologyDrop { database: String, },
}

Variants§

§

CreateNode

Fields

§id: i64
§labels: Arc<Vec<String>>
§properties: Arc<PropertyMap>
§

CreateRel

Fields

§id: i64
§start: i64
§end: i64
§rel_type: String
§properties: Arc<PropertyMap>
§

DeleteNode

Fields

§id: i64
§

DeleteRel

Fields

§id: i64
§

SetNodeProp

Fields

§id: i64
§value: Value
§

RemoveNodeProp

Fields

§id: i64
§

SetRelProp

Fields

§id: i64
§value: Value
§

RemoveRelProp

Fields

§id: i64
§

AddLabels

Fields

§id: i64
§labels: Vec<String>
§

RemoveLabels

Fields

§id: i64
§labels: Vec<String>
§

CreateIndex

Fields

§name: String
§label: String
§property: String
§

DropIndex

Fields

§name: String
§

CreateConstraint

Fields

§name: String
§relationship: bool
§label: String
§properties: Vec<String>
§kind: String
§property_type: Option<String>
§enforced_label: Option<String>

The label a labelExistence/sourceLabel/targetLabel constraint requires to be present (CIP-177, CIP-266), part of the constraint’s schema identity. None for every other kind and for rows written before the field existed.

§

DropConstraint

Fields

§name: String
§

CatalogIndexDetail

Fields

§name: String
§options: Value

The evaluated OPTIONS map (tagged JSON values, see props_json). Decoded strictly by props_from_json.

§

CatalogDerivedConstraint

SHOW metadata for an explicitly enforced constraint.

Fields

§constraint: Constraint
§

PutDatabase

Fields

§name: String
§language: u32
§composite: bool
§

DropDatabase

Legacy, decode-only: DROP DATABASE was executable before the parser failed closed on unsupported administration commands (ADR-0116), so WALs and snapshots written by those versions may carry this op. New code never constructs it; replay is the ADR-0116 §8 no-op (only fixed namespaces exist, and a fixed namespace can never be dropped). Removing the variant would make serde reject the old record and hard-fail store open (ADR-0114).

Fields

§name: String
§

PutGraphType

Fields

§name: String
§

SetCurrentGraphType

Fields

§

PullIdentityPut

Source-scoped pull identity (ADR-0080). Not a graph CDC event.

Fields

§source: String
§remote_id: String
§local_id: i64
§

OntologySet

Store-level ontology document ops (ADR-0120 §3). Not graph ops: they carry the validated ontology document verbatim (at most one per store, for neo4j) and mutate no graph or catalog state; the derived system_ontologies graph is rebuilt from the document. The document is bounded by MAX_ONTOLOGY_SPEC_BYTES, checked before the commit is written.

Fields

§database: String
§spec: String
§

OntologyDrop

Fields

§database: String

Implementations§

Source§

impl RedoOp

Source

pub fn create_constraint(def: ConstraintDef) -> RedoOp

The RedoOp::CreateConstraint row for one catalog definition — the one crossing from the catalog shape to the durable op shape, so the field copies live once (RedoOp::constraint_def is its reader).

Source

pub fn constraint_def(&self) -> Option<ConstraintDef>

The catalog definition a CreateConstraint row carries, None for every other op — the reader twin of RedoOp::create_constraint.

Source

pub fn create_node( id: i64, labels: impl Into<Arc<Vec<String>>>, properties: impl Into<PropertyMap>, ) -> RedoOp

Source

pub fn create_rel( id: i64, start: i64, end: i64, rel_type: String, properties: impl Into<PropertyMap>, ) -> RedoOp

Source

pub fn delete_node(id: i64) -> RedoOp

Source

pub fn delete_rel(id: i64) -> RedoOp

Source

pub fn add_labels(id: i64, labels: Vec<String>) -> RedoOp

Source

pub fn remove_labels(id: i64, labels: Vec<String>) -> RedoOp

Source

pub fn set_node_prop(id: i64, key: String, value: Value) -> RedoOp

Source

pub fn remove_node_prop(id: i64, key: String) -> RedoOp

Source

pub fn set_rel_prop(id: i64, key: String, value: Value) -> RedoOp

Source

pub fn remove_rel_prop(id: i64, key: String) -> RedoOp

Source

pub fn ontology_op(&self) -> Option<OntologyOp<'_>>

The typed ontology classification of this op (ADR-0120 §3); None for every non-ontology op. One match — Self::is_ontology_op, the WAL’s MDBWAL02 segment-magic rule (ADR-0120 §4), the scanner’s corruption check and the facade’s commit scan all derive from it.

Source

pub fn is_ontology_op(&self) -> bool

Whether this is a store-level ontology document op (ADR-0120 §3). The WAL uses it for the MDBWAL02 segment-magic rule (ADR-0120 §4) and the scanner for the corruption check; the commit-preflight seam uses it for the document-size gate.

Source

pub fn validate_ids(&self) -> Result<(), Error>

The one pre-persist validation entry point, run before writing or applying redo: every persisted local ID is in range (the upper bound is reserved because installation advances the ID allocator), and an OntologySet document is within the 16 MiB ADR-0086 object envelope (ADR-0120 §3). Non-ontology ops always pass the size arm.

Source

pub fn is_catalog(&self) -> bool

Whether this is a catalog op: anything but the ten entity ops, PullIdentityPut and the store-level ontology ops (ADR-0120 §3). The write overlay replays only these when it resolves its speculative schema (ADR-0172 §8). Classified once, by Self::write_target (ADR-0173).

Source

pub fn write_target(&self) -> WriteTarget<'_>

What this op writes, for ADR-0015 conflict classification. Total: every variant classifies, so a future op is a compile error here, not a silently missed conflict rule; consumers bind every payload from the one classification. Crate-internal: the consumer set is graph::conflict; re-export if a cross-crate consumer appears.

Source

pub fn catalog_names(&self) -> Vec<CatalogName<'_>>

Every catalog name this op mentions — a label, a relationship type or a property key — for the write overlay’s catalog facts (ADR-0363 decision 5): the redo log is the scratch’s one write record, so a name a transaction has mentioned is known before the commit publishes it.

Total over the enum: every variant classifies, and a new variant is a compile error here, never a silently skipped name. Monotone, like the committed catalog: an op that removes a name still mentions it — a RemoveLabels reads exactly like an AddLabels, a property REMOVE like a SET — because a name outlives its last write. A drop names only its schema object (an index or constraint name), never the label or key it was built on, so it cannot un-name one either.

The names are the graph catalog’s. Two DDL families name them without writing data: an index or constraint create names its subject label (or relationship type) and its property keys, and the typed index detail names every indexed property plus a vector index’s WITH keys. CreateIndex.property carries the legacy {props}#{KIND}#{name} encoding on the constraint-backed rows (and a bare name on the IR path), so its head is the key (split_legacy_property_encoding). Store metadata — index, constraint, database, graph-type and ontology names — is not a graph catalog name and contributes nothing.

Trait Implementations§

Source§

impl Clone for RedoOp

Source§

fn clone(&self) -> RedoOp

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 RedoOp

Source§

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

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

impl<'de> Deserialize<'de> for RedoOp

Source§

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

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

impl PartialEq for RedoOp

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl Serialize for RedoOp

Source§

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

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

impl StructuralPartialEq for RedoOp

Auto Trait Implementations§

§

impl Forget for RedoOp

§

impl Freeze for RedoOp
where *const ArcInner<Vec<String>> is !null: Freeze, PhantomData<ArcInner<Vec<String>>>: Freeze, *const ArcInner<PropertyMap> is !null: Freeze, PhantomData<ArcInner<PropertyMap>>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<str> is !null: Freeze, PhantomData<ArcInner<str>>: Freeze, *const ArcInner<Vec<Value>> is !null: Freeze, PhantomData<ArcInner<Vec<Value>>>: Freeze, *const ArcInner<BTreeMap<String, Value>> is !null: Freeze, PhantomData<ArcInner<BTreeMap<String, Value>>>: Freeze, *const ArcInner<Node> is !null: Freeze, PhantomData<ArcInner<Node>>: Freeze, *const ArcInner<Relationship> is !null: Freeze, PhantomData<ArcInner<Relationship>>: Freeze, *const ArcInner<Path> is !null: Freeze, PhantomData<ArcInner<Path>>: Freeze, NonZero<i32>: Freeze, *const CivilZonedFields is !null: Freeze, PhantomData<CivilZonedFields>: Freeze, *const ArcInner<[f32]> is !null: Freeze, PhantomData<ArcInner<[f32]>>: Freeze, *const ArcInner<[f64]> is !null: Freeze, PhantomData<ArcInner<[f64]>>: Freeze, *const ArcInner<[i64]> is !null: Freeze, PhantomData<ArcInner<[i64]>>: Freeze, *const ArcInner<[u8]> is !null: Freeze, PhantomData<ArcInner<[u8]>>: Freeze, PhantomData<String>: Freeze, PhantomData<Value>: Freeze, PhantomData<usize>: Freeze, PhantomData<Bucket<String, Value>>: Freeze, PhantomData<NodeTypeModel>: Freeze, PhantomData<EdgeTypeModel>: Freeze, PhantomData<GraphTypeConstraintModel>: Freeze,

§

impl Move for RedoOp

§

impl RefUnwindSafe for RedoOp

§

impl Send for RedoOp

§

impl Sync for RedoOp

§

impl Unpin for RedoOp

§

impl UnsafeUnpin for RedoOp
where *const ArcInner<Vec<String>> is !null: UnsafeUnpin, PhantomData<ArcInner<Vec<String>>>: UnsafeUnpin, *const ArcInner<PropertyMap> is !null: UnsafeUnpin, PhantomData<ArcInner<PropertyMap>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ArcInner<str> is !null: UnsafeUnpin, PhantomData<ArcInner<str>>: UnsafeUnpin, *const ArcInner<Vec<Value>> is !null: UnsafeUnpin, PhantomData<ArcInner<Vec<Value>>>: UnsafeUnpin, *const ArcInner<BTreeMap<String, Value>> is !null: UnsafeUnpin, PhantomData<ArcInner<BTreeMap<String, Value>>>: UnsafeUnpin, *const ArcInner<Node> is !null: UnsafeUnpin, PhantomData<ArcInner<Node>>: UnsafeUnpin, *const ArcInner<Relationship> is !null: UnsafeUnpin, PhantomData<ArcInner<Relationship>>: UnsafeUnpin, *const ArcInner<Path> is !null: UnsafeUnpin, PhantomData<ArcInner<Path>>: UnsafeUnpin, NonZeroI32Inner: UnsafeUnpin, *const CivilZonedFields is !null: UnsafeUnpin, PhantomData<CivilZonedFields>: UnsafeUnpin, *const ArcInner<[f32]> is !null: UnsafeUnpin, PhantomData<ArcInner<[f32]>>: UnsafeUnpin, *const ArcInner<[f64]> is !null: UnsafeUnpin, PhantomData<ArcInner<[f64]>>: UnsafeUnpin, *const ArcInner<[i64]> is !null: UnsafeUnpin, PhantomData<ArcInner<[i64]>>: UnsafeUnpin, *const ArcInner<[u8]> is !null: UnsafeUnpin, PhantomData<ArcInner<[u8]>>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<Bucket<String, Value>>: UnsafeUnpin, PhantomData<NodeTypeModel>: UnsafeUnpin, PhantomData<EdgeTypeModel>: UnsafeUnpin, PhantomData<GraphTypeConstraintModel>: UnsafeUnpin,

§

impl UnwindSafe for RedoOp

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> 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V