Skip to main content

Queryable

Trait Queryable 

Source
pub trait Queryable {
    // Required methods
    fn q_explain<T>(
        &self,
        query: &str,
        inputs: T,
    ) -> Result<QueryExplanation, MentatError>
       where T: Into<Option<QueryInputs>>;
    fn q_once<T>(
        &self,
        query: &str,
        inputs: T,
    ) -> Result<QueryOutput, MentatError>
       where T: Into<Option<QueryInputs>>;
    fn q_prepare<T>(
        &self,
        query: &str,
        inputs: T,
    ) -> Result<PreparedQuery<'_>, MentatError>
       where T: Into<Option<QueryInputs>>;
    fn lookup_values_for_attribute<E>(
        &self,
        entity: E,
        attribute: &Keyword,
    ) -> Result<Vec<TypedValue>, MentatError>
       where E: Into<i64>;
    fn lookup_value_for_attribute<E>(
        &self,
        entity: E,
        attribute: &Keyword,
    ) -> Result<Option<TypedValue>, MentatError>
       where E: Into<i64>;
}

Required Methods§

Source

fn q_explain<T>( &self, query: &str, inputs: T, ) -> Result<QueryExplanation, MentatError>
where T: Into<Option<QueryInputs>>,

Source

fn q_once<T>(&self, query: &str, inputs: T) -> Result<QueryOutput, MentatError>
where T: Into<Option<QueryInputs>>,

Source

fn q_prepare<T>( &self, query: &str, inputs: T, ) -> Result<PreparedQuery<'_>, MentatError>
where T: Into<Option<QueryInputs>>,

Source

fn lookup_values_for_attribute<E>( &self, entity: E, attribute: &Keyword, ) -> Result<Vec<TypedValue>, MentatError>
where E: Into<i64>,

Source

fn lookup_value_for_attribute<E>( &self, entity: E, attribute: &Keyword, ) -> Result<Option<TypedValue>, MentatError>
where E: Into<i64>,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Queryable for Store

Source§

impl<'a, 'c> Queryable for InProgress<'a, 'c>

Source§

impl<'a, 'c> Queryable for InProgressRead<'a, 'c>