Skip to main content

GraphStorage

Trait GraphStorage 

Source
pub trait GraphStorage: Send + Sync {
Show 24 methods // Required methods fn begin_write(&self) -> GraphStoreResult<Box<dyn GraphWriteTransaction>>; fn graph_names(&self) -> GraphStoreResult<Vec<String>>; fn has_graph(&self, graph: &str) -> GraphStoreResult<bool>; fn create_graph(&self, graph: &str) -> GraphStoreResult<()>; fn delete_graph(&self, graph: &str) -> GraphStoreResult<()>; fn registry(&self, graph: &str) -> GraphStoreResult<GraphLabelRegistry>; fn save_registry( &self, graph: &str, registry: &GraphLabelRegistry, ) -> GraphStoreResult<()>; fn counter(&self, kind: GraphEntityKind) -> GraphStoreResult<Option<u64>>; fn save_counter( &self, kind: GraphEntityKind, next: u64, ) -> GraphStoreResult<()>; fn vertex(&self, id: u64) -> GraphStoreResult<Option<Vertex>>; fn edge(&self, id: u64) -> GraphStoreResult<Option<Edge>>; fn save_vertex(&self, vertex: &Vertex) -> GraphStoreResult<()>; fn save_edge(&self, edge: &Edge) -> GraphStoreResult<()>; fn delete_vertex(&self, id: u64) -> GraphStoreResult<()>; fn delete_edge(&self, id: u64) -> GraphStoreResult<()>; fn ids( &self, filter: GraphEntityFilter<'_>, after: Option<u64>, limit: usize, ) -> GraphStoreResult<Vec<u64>>; fn count(&self, filter: GraphEntityFilter<'_>) -> GraphStoreResult<u64>; fn max_id(&self, kind: GraphEntityKind) -> GraphStoreResult<Option<u64>>; fn memberships( &self, kind: GraphEntityKind, id: u64, ) -> GraphStoreResult<Vec<String>>; fn has_membership( &self, kind: GraphEntityKind, id: u64, graph: &str, ) -> GraphStoreResult<bool>; fn attach( &self, kind: GraphEntityKind, id: u64, graph: &str, ) -> GraphStoreResult<()>; fn detach( &self, kind: GraphEntityKind, id: u64, graph: &str, ) -> GraphStoreResult<()>; // Provided methods fn fork_overlay(&self) -> Option<Arc<dyn GraphStorage>> { ... } fn unmodified_read_snapshot(&self) -> Option<PersistentGraphStore> { ... }
}
Expand description

No entity, membership, or adjacency collection is retained by a handle. Multi-read operations run in the caller’s pinned storage transaction.

Required Methods§

Source

fn begin_write(&self) -> GraphStoreResult<Box<dyn GraphWriteTransaction>>

Source

fn graph_names(&self) -> GraphStoreResult<Vec<String>>

Source

fn has_graph(&self, graph: &str) -> GraphStoreResult<bool>

Source

fn create_graph(&self, graph: &str) -> GraphStoreResult<()>

Source

fn delete_graph(&self, graph: &str) -> GraphStoreResult<()>

Source

fn registry(&self, graph: &str) -> GraphStoreResult<GraphLabelRegistry>

Source

fn save_registry( &self, graph: &str, registry: &GraphLabelRegistry, ) -> GraphStoreResult<()>

Source

fn counter(&self, kind: GraphEntityKind) -> GraphStoreResult<Option<u64>>

Source

fn save_counter(&self, kind: GraphEntityKind, next: u64) -> GraphStoreResult<()>

Source

fn vertex(&self, id: u64) -> GraphStoreResult<Option<Vertex>>

Source

fn edge(&self, id: u64) -> GraphStoreResult<Option<Edge>>

Source

fn save_vertex(&self, vertex: &Vertex) -> GraphStoreResult<()>

Source

fn save_edge(&self, edge: &Edge) -> GraphStoreResult<()>

Source

fn delete_vertex(&self, id: u64) -> GraphStoreResult<()>

Source

fn delete_edge(&self, id: u64) -> GraphStoreResult<()>

Source

fn ids( &self, filter: GraphEntityFilter<'_>, after: Option<u64>, limit: usize, ) -> GraphStoreResult<Vec<u64>>

Source

fn count(&self, filter: GraphEntityFilter<'_>) -> GraphStoreResult<u64>

Source

fn max_id(&self, kind: GraphEntityKind) -> GraphStoreResult<Option<u64>>

Source

fn memberships( &self, kind: GraphEntityKind, id: u64, ) -> GraphStoreResult<Vec<String>>

Source

fn has_membership( &self, kind: GraphEntityKind, id: u64, graph: &str, ) -> GraphStoreResult<bool>

Source

fn attach( &self, kind: GraphEntityKind, id: u64, graph: &str, ) -> GraphStoreResult<()>

Source

fn detach( &self, kind: GraphEntityKind, id: u64, graph: &str, ) -> GraphStoreResult<()>

Provided Methods§

Source

fn fork_overlay(&self) -> Option<Arc<dyn GraphStorage>>

Copy only transaction-local write identities when preparing a new command candidate. The underlying durable snapshots remain shared.

Source

fn unmodified_read_snapshot(&self) -> Option<PersistentGraphStore>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§