QuadStorage

Trait QuadStorage 

Source
pub trait QuadStorage: Send + Sync {
Show 14 methods // Required methods fn encoding(&self) -> QuadStorageEncoding; fn object_id_mapping(&self) -> Option<Arc<dyn ObjectIdMapping>>; fn planners<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 RdfFusionContextView, ) -> Pin<Box<dyn Future<Output = Vec<Arc<dyn ExtensionPlanner + Send + Sync>>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn extend<'life0, 'async_trait>( &'life0 self, quads: Vec<Quad>, ) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn remove<'life0, 'life1, 'async_trait>( &'life0 self, quad: QuadRef<'life1>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn insert_named_graph<'a, 'life0, 'async_trait>( &'life0 self, graph_name: NamedOrBlankNodeRef<'a>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait; fn named_graphs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<NamedOrBlankNode>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn contains_named_graph<'a, 'life0, 'async_trait>( &'life0 self, graph_name: NamedOrBlankNodeRef<'a>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait; fn clear<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn clear_graph<'a, 'life0, 'async_trait>( &'life0 self, graph_name: GraphNameRef<'a>, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait; fn drop_named_graph<'life0, 'life1, 'async_trait>( &'life0 self, graph_name: NamedOrBlankNodeRef<'life1>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn len<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn optimize<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn validate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait;
}

Required Methods§

Source

fn encoding(&self) -> QuadStorageEncoding

Returns the quad storage encoding.

Source

fn object_id_mapping(&self) -> Option<Arc<dyn ObjectIdMapping>>

Returns a reference to the used ObjectIdMapping.

Source

fn planners<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 RdfFusionContextView, ) -> Pin<Box<dyn Future<Output = Vec<Arc<dyn ExtensionPlanner + Send + Sync>>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Returns a list of planners that support planning logical nodes requiring access to the storage layer.

§Consistency

A query plan must often evaluate multiple quad patterns that have access to the same storage. It is the responsibility of the storage layer to ensure that the quad patterns use the same snapshot of the storage layer.

Source

fn extend<'life0, 'async_trait>( &'life0 self, quads: Vec<Quad>, ) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Loads the given quads into the storage.

Source

fn remove<'life0, 'life1, 'async_trait>( &'life0 self, quad: QuadRef<'life1>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Removes the given quad from the storage.

Source

fn insert_named_graph<'a, 'life0, 'async_trait>( &'life0 self, graph_name: NamedOrBlankNodeRef<'a>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait,

Creates an empty named graph in the storage.

Source

fn named_graphs<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<NamedOrBlankNode>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns the list of named graphs in the storage.

Source

fn contains_named_graph<'a, 'life0, 'async_trait>( &'life0 self, graph_name: NamedOrBlankNodeRef<'a>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait,

Returns whether graph_name is a named graph in the storage.

Source

fn clear<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Clears the entire storage.

Source

fn clear_graph<'a, 'life0, 'async_trait>( &'life0 self, graph_name: GraphNameRef<'a>, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait,

Clears the entire graph.

Source

fn drop_named_graph<'life0, 'life1, 'async_trait>( &'life0 self, graph_name: NamedOrBlankNodeRef<'life1>, ) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Removes the entire named graph from the storage.

Source

fn len<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Returns the number of quads in the storage.

Source

fn optimize<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Optimizes the storage (e.g., building indices).

Source

fn validate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Validates invariants in the store

Implementors§