Skip to main content

GraphImport

Trait GraphImport 

Source
pub trait GraphImport: GraphExport + Sync {
Show 16 methods // Required methods fn set_next_node_id(&self, id: i64); fn set_next_rel_id(&self, id: i64); fn set_commit_ts(&self, ts: u64); fn install_named_index(&self, index: IndexDef) -> Result<()>; fn install_named_constraint(&self, constraint: ConstraintDef) -> Result<()>; fn restore_checkpoint_theater( &self, theater: CheckpointTheater, ) -> Result<()>; fn mark_legacy_unenforced(&self); fn finish_restore(&self); fn load_checkpoint_nodes(&self, nodes: &[Node]) -> Result<()>; fn load_checkpoint_rels(&self, rels: &[Relationship]) -> Result<()>; fn apply_replayed_redo( &self, ops: Vec<RedoOp>, commit_ts: u64, ) -> Result<()>; fn rebuild_indexes(&self); fn restore_graph_type_spec(&self, spec: Option<&str>) -> Result<()>; fn restore_legacy_enforced_constraints( &self, constraints: Vec<Constraint>, ) -> Result<()>; // Provided methods fn load_checkpoint_node(&self, node: Node) -> Result<()> { ... } fn load_checkpoint_rel(&self, rel: Relationship) -> Result<()> { ... }
}
Expand description

The fill side of a graph: what a codec installs checkpoint rows through. Sync because the restore installs one worker’s rows per core — a slice’s install is the same interior-mutable call the single-threaded path made.

Required Methods§

Source

fn set_next_node_id(&self, id: i64)

Source

fn set_next_rel_id(&self, id: i64)

Source

fn set_commit_ts(&self, ts: u64)

Source

fn install_named_index(&self, index: IndexDef) -> Result<()>

Source

fn install_named_constraint(&self, constraint: ConstraintDef) -> Result<()>

Source

fn restore_checkpoint_theater(&self, theater: CheckpointTheater) -> Result<()>

Source

fn mark_legacy_unenforced(&self)

Source

fn finish_restore(&self)

Source

fn load_checkpoint_nodes(&self, nodes: &[Node]) -> Result<()>

Install a slice of checkpoint nodes — one decoded batch, a window-disjoint run of ids. The installer owns the row-id check: every id in the slice is validated here, so a caller does not repeat it, and an earlier row for an id is replaced by the later one.

Source

fn load_checkpoint_rels(&self, rels: &[Relationship]) -> Result<()>

Relationship sibling of Self::load_checkpoint_nodes, with the same id obligation over a row’s id and both endpoints.

Source

fn apply_replayed_redo(&self, ops: Vec<RedoOp>, commit_ts: u64) -> Result<()>

Source

fn rebuild_indexes(&self)

Source

fn restore_graph_type_spec(&self, spec: Option<&str>) -> Result<()>

Source

fn restore_legacy_enforced_constraints( &self, constraints: Vec<Constraint>, ) -> Result<()>

Provided Methods§

Source

fn load_checkpoint_node(&self, node: Node) -> Result<()>

Restore one node: the one-element slice of Self::load_checkpoint_nodes.

Source

fn load_checkpoint_rel(&self, rel: Relationship) -> Result<()>

Restore one relationship: the one-element slice of Self::load_checkpoint_rels.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§