pub trait StorageEngine: Send + Sync {
// Required methods
fn init<'life0, 'async_trait>(
&'life0 mut self,
config: StorageConfig,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn store_triple<'life0, 'life1, 'async_trait>(
&'life0 self,
triple: &'life1 Triple,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn store_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
triples: &'life1 [Triple],
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<Vec<Triple>, OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<usize, OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats, OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn optimize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn backup<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn restore<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Storage engine trait
Required Methods§
Sourcefn init<'life0, 'async_trait>(
&'life0 mut self,
config: StorageConfig,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
config: StorageConfig,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the storage engine
Sourcefn store_triple<'life0, 'life1, 'async_trait>(
&'life0 self,
triple: &'life1 Triple,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_triple<'life0, 'life1, 'async_trait>(
&'life0 self,
triple: &'life1 Triple,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store a triple
Sourcefn store_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
triples: &'life1 [Triple],
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn store_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
triples: &'life1 [Triple],
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store multiple triples
Sourcefn query_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<Vec<Triple>, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<Vec<Triple>, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query triples by pattern
Sourcefn delete_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<usize, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_triples<'life0, 'life1, 'async_trait>(
&'life0 self,
pattern: &'life1 TriplePattern,
) -> Pin<Box<dyn Future<Output = Result<usize, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete triples by pattern
Sourcefn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats, OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get storage statistics
Sourcefn optimize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn optimize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), OxirsError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Optimize storage