Skip to main content

VersionChainQuerier

Trait VersionChainQuerier 

Source
pub trait VersionChainQuerier: Send + Sync {
    // Required methods
    fn get_version_chain<'life0, 'life1, 'async_trait>(
        &'life0 self,
        memory_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn supersede_memory<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        old_id: &'life1 str,
        new_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn get_version_chain<'life0, 'life1, 'async_trait>( &'life0 self, memory_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns the full version chain for a memory, ordered by created_at ascending. Includes the memory itself and all versions in its chain.

Source

fn supersede_memory<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, old_id: &'life1 str, new_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Manually supersede an old memory with a new one. Creates SUPERSEDES relationship and sets superseded_by_id on the old memory.

Implementors§