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 + Sync + Send>>> + 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§
Sourcefn encoding(&self) -> QuadStorageEncoding
fn encoding(&self) -> QuadStorageEncoding
Returns the quad storage encoding.
Sourcefn object_id_mapping(&self) -> Option<Arc<dyn ObjectIdMapping>>
fn object_id_mapping(&self) -> Option<Arc<dyn ObjectIdMapping>>
Returns a reference to the used ObjectIdMapping.
Sourcefn planners<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 RdfFusionContextView,
) -> Pin<Box<dyn Future<Output = Vec<Arc<dyn ExtensionPlanner + Sync + Send>>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn planners<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 RdfFusionContextView,
) -> Pin<Box<dyn Future<Output = Vec<Arc<dyn ExtensionPlanner + Sync + Send>>> + 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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<'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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.