pub trait RewriteRule: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn apply(&self, query: QueryExpr, ctx: &mut RewriteContext) -> QueryExpr;
fn is_applicable(&self, query: &QueryExpr) -> bool;
}Expand description
A rewrite rule that transforms query expressions
Required Methods§
Sourcefn apply(&self, query: QueryExpr, ctx: &mut RewriteContext) -> QueryExpr
fn apply(&self, query: QueryExpr, ctx: &mut RewriteContext) -> QueryExpr
Apply the rule to a query expression
Sourcefn is_applicable(&self, query: &QueryExpr) -> bool
fn is_applicable(&self, query: &QueryExpr) -> bool
Check if this rule is applicable to the query