Skip to main content

StorageWriterAdapter

Struct StorageWriterAdapter 

Source
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 StorageEngine

Trait Implementations§

Source§

impl GraphWriter for StorageWriterAdapter<'_>

Source§

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

Source§

fn put_edge(&self, edge: &Edge) -> Result<()>

Source§

fn delete_edge(&self, id: EdgeId) -> Result<()>

Source§

fn detach_delete_node(&self, id: NodeId) -> Result<()>

Source§

fn create_property_index( &self, label: &str, properties: &[String], ) -> Result<()>

Declare a new property index. properties is a slice so the composite form (CREATE INDEX FOR (n:L) ON (n.a, n.b)) fits the same surface as single-property. Default impl errors so remote writers that don’t yet support cluster-aware DDL surface the limitation immediately; storage-backed writers override via the blanket impl.
Source§

fn drop_property_index(&self, label: &str, properties: &[String]) -> Result<()>

Tear down a property index. Mirrors Self::create_property_index.
Source§

fn list_property_indexes(&self) -> Result<Vec<(String, Vec<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, properties: &[String], ) -> Result<()>

Relationship-scope analogue of Self::create_property_index.
Source§

fn drop_edge_property_index( &self, edge_type: &str, properties: &[String], ) -> Result<()>

Tear down an edge property index. Mirrors Self::create_edge_property_index.
Source§

fn list_edge_property_indexes(&self) -> Result<Vec<(String, Vec<String>)>>

Snapshot the currently-registered edge property indexes as (edge_type, property) pairs. Default impl returns an empty list.
Source§

fn create_point_index(&self, label: &str, property: &str) -> Result<()>

Declare a point / spatial index on (label, property). Default impl errors — remote writers opt in via the blanket StorageEngine impl or a cluster-aware override.
Source§

fn drop_point_index(&self, label: &str, property: &str) -> Result<()>

Tear down a point index. Mirrors Self::create_point_index.
Source§

fn list_point_indexes(&self) -> Result<Vec<(String, String)>>

Snapshot the currently-registered point indexes as (label, property) pairs. Default impl returns empty.
Source§

fn create_edge_point_index(&self, edge_type: &str, property: &str) -> Result<()>

Relationship-scope analogue of Self::create_point_index.
Source§

fn drop_edge_point_index(&self, edge_type: &str, property: &str) -> Result<()>

Tear down an edge point index. Mirrors Self::create_edge_point_index.
Source§

fn list_edge_point_indexes(&self) -> Result<Vec<(String, String)>>

Snapshot the currently-registered edge point indexes as (edge_type, property) pairs.
Source§

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<()>

Tear down a constraint by name. Mirrors Self::create_property_constraint.
Source§

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§

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<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> Same for T

Source§

type Output = T

Should always be Self
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.