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§
Sourcefn execute(&self, plan: &QueryPlan) -> Result<QueryResult, QueryError>
fn execute(&self, plan: &QueryPlan) -> Result<QueryResult, QueryError>
Execute a query plan
Sourcefn count(
&self,
table: &str,
filter: Option<&Filter>,
) -> Result<usize, QueryError>
fn count( &self, table: &str, filter: Option<&Filter>, ) -> Result<usize, QueryError>
Count rows matching filter
Sourcefn table_exists(&self, table: &str) -> bool
fn table_exists(&self, table: &str) -> bool
Check if table exists