Skip to main content

QueryStore

Trait QueryStore 

Source
pub trait QueryStore: Send + Sync {
    // Required method
    fn query_document<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        doc_hash: ContentHash,
        xpath: &'life1 str,
        mode: QueryMode,
        namespaces: &'life2 NamespaceMap,
    ) -> Pin<Box<dyn Future<Output = Result<QueryResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for querying documents stored in the object store.

Backends can override this to use specialized indexing/search strategies. The default implementation collects the subtree, builds XML via export, and evaluates XPath using xee-xpath.

Required Methods§

Source

fn query_document<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, doc_hash: ContentHash, xpath: &'life1 str, mode: QueryMode, namespaces: &'life2 NamespaceMap, ) -> Pin<Box<dyn Future<Output = Result<QueryResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Query a document by its hash.

Implementors§