Skip to main content

QueryExecutor

Trait QueryExecutor 

Source
pub trait QueryExecutor {
    // Required methods
    fn execute(&self, plan: &QueryPlan) -> Result<QueryResult, QueryError>;
    fn count(
        &self,
        table: &str,
        filter: Option<&Filter>,
    ) -> Result<usize, QueryError>;
    fn table_exists(&self, table: &str) -> bool;
    fn table_columns(&self, table: &str) -> Option<Vec<String>>;
}
Expand description

Query executor trait

Required Methods§

Source

fn execute(&self, plan: &QueryPlan) -> Result<QueryResult, QueryError>

Execute a query plan

Source

fn count( &self, table: &str, filter: Option<&Filter>, ) -> Result<usize, QueryError>

Count rows matching filter

Source

fn table_exists(&self, table: &str) -> bool

Check if table exists

Source

fn table_columns(&self, table: &str) -> Option<Vec<String>>

Get table column names

Implementors§