Skip to main content

StorageEngine

Trait StorageEngine 

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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,

Backup storage

Source

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,

Restore from backup

Implementors§