pub trait ASTTransformer: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn transform(&mut self, stmt: SelectStatement) -> Result<SelectStatement>;
// Provided methods
fn description(&self) -> &str { ... }
fn enabled(&self) -> bool { ... }
fn begin(&mut self) -> Result<()> { ... }
fn end(&mut self) -> Result<()> { ... }
}Expand description
Trait for AST transformers that can be added to the preprocessing pipeline
Required Methods§
Sourcefn transform(&mut self, stmt: SelectStatement) -> Result<SelectStatement>
fn transform(&mut self, stmt: SelectStatement) -> Result<SelectStatement>
Transform the AST, returning the modified statement
Transformers should be idempotent where possible and should not modify the semantic meaning of the query.
Provided Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Description of what this transformer does