pub struct StorageWriterAdapter<'a>(pub &'a dyn StorageEngine);Expand description
Adapter that lets a &dyn StorageEngine act as a GraphWriter.
See crate::reader::StorageReaderAdapter for the rationale.
Tuple Fields§
§0: &'a dyn StorageEngineTrait Implementations§
Source§impl GraphWriter for StorageWriterAdapter<'_>
impl GraphWriter for StorageWriterAdapter<'_>
fn put_node(&self, node: &Node) -> Result<()>
fn put_edge(&self, edge: &Edge) -> Result<()>
fn delete_edge(&self, id: EdgeId) -> Result<()>
fn detach_delete_node(&self, id: NodeId) -> Result<()>
Source§fn create_property_index(&self, label: &str, property: &str) -> Result<()>
fn create_property_index(&self, label: &str, property: &str) -> Result<()>
Declare a new property index. Default impl errors so remote
writers (Raft, routing) that don’t yet support cluster-aware
DDL surface the limitation immediately. Storage-backed writers
override this via the blanket impl.
Source§fn drop_property_index(&self, label: &str, property: &str) -> Result<()>
fn drop_property_index(&self, label: &str, property: &str) -> Result<()>
Tear down a property index. Mirrors
Self::create_property_index.Source§fn list_property_indexes(&self) -> Result<Vec<(String, String)>>
fn list_property_indexes(&self) -> Result<Vec<(String, String)>>
Snapshot the currently-registered property indexes as
(label, property) pairs for SHOW INDEXES. Default impl
returns an empty list — remote writers will wire real
fan-out in Phase C.Source§fn create_edge_property_index(
&self,
edge_type: &str,
property: &str,
) -> Result<()>
fn create_edge_property_index( &self, edge_type: &str, property: &str, ) -> Result<()>
Relationship-scope analogue of
Self::create_property_index. Default impl errors so remote
writers that haven’t plumbed edge-index DDL yet surface the
limitation immediately; storage-backed writers override via
the blanket impl.Source§fn drop_edge_property_index(
&self,
edge_type: &str,
property: &str,
) -> Result<()>
fn drop_edge_property_index( &self, edge_type: &str, property: &str, ) -> Result<()>
Tear down an edge property index. Mirrors
Self::create_edge_property_index.Source§fn list_edge_property_indexes(&self) -> Result<Vec<(String, String)>>
fn list_edge_property_indexes(&self) -> Result<Vec<(String, String)>>
Snapshot the currently-registered edge property indexes as
(edge_type, property) pairs. Default impl returns an empty
list.Source§fn create_property_constraint(
&self,
name: Option<&str>,
scope: &ConstraintScope,
properties: &[String],
kind: PropertyConstraintKind,
if_not_exists: bool,
) -> Result<PropertyConstraintSpec>
fn create_property_constraint( &self, name: Option<&str>, scope: &ConstraintScope, properties: &[String], kind: PropertyConstraintKind, if_not_exists: bool, ) -> Result<PropertyConstraintSpec>
Declare a new property constraint. Default impl errors so
remote writers that haven’t plumbed constraint DDL yet surface
the limitation immediately — storage-backed writers override
via the blanket impl.
properties is a list to accommodate
composite kinds (NodeKey); single-property kinds pass a
one-element slice.Source§fn drop_property_constraint(&self, name: &str, if_exists: bool) -> Result<()>
fn drop_property_constraint(&self, name: &str, if_exists: bool) -> Result<()>
Tear down a constraint by name. Mirrors
Self::create_property_constraint.Source§fn list_property_constraints(&self) -> Result<Vec<PropertyConstraintSpec>>
fn list_property_constraints(&self) -> Result<Vec<PropertyConstraintSpec>>
Snapshot the currently-registered constraints for
SHOW CONSTRAINTS. Default impl returns an empty list.Auto Trait Implementations§
impl<'a> Freeze for StorageWriterAdapter<'a>
impl<'a> !RefUnwindSafe for StorageWriterAdapter<'a>
impl<'a> Send for StorageWriterAdapter<'a>
impl<'a> Sync for StorageWriterAdapter<'a>
impl<'a> Unpin for StorageWriterAdapter<'a>
impl<'a> UnsafeUnpin for StorageWriterAdapter<'a>
impl<'a> !UnwindSafe for StorageWriterAdapter<'a>
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
Mutably borrows from an owned value. Read more