Skip to main content

QueryExecutor

Trait QueryExecutor 

Source
pub trait QueryExecutor {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn fetch_all(
        &self,
        query: &CompiledQuery,
    ) -> Result<Vec<Record>, Self::Error>;
    fn execute(&self, query: &CompiledQuery) -> Result<u64, Self::Error>;

    // Provided methods
    fn begin_transaction(&self) -> Result<GraphTransactionBoundary, Self::Error> { ... }
    fn commit_transaction(&self) -> Result<(), Self::Error> { ... }
    fn rollback_transaction(&self) -> Result<(), Self::Error> { ... }
}

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn fetch_all(&self, query: &CompiledQuery) -> Result<Vec<Record>, Self::Error>

Source

fn execute(&self, query: &CompiledQuery) -> Result<u64, Self::Error>

Provided Methods§

Implementors§