pub struct Normalizer {
pub options: NormalizerOptions,
}Expand description
A visitor for SQL AST nodes that normalizes SQL queries.
Fields§
§options: NormalizerOptionsImplementations§
Source§impl Normalizer
impl Normalizer
pub fn new() -> Self
pub fn with_options(self, options: NormalizerOptions) -> Self
Trait Implementations§
Source§impl Default for Normalizer
impl Default for Normalizer
Source§fn default() -> Normalizer
fn default() -> Normalizer
Returns the “default value” for a type. Read more
Source§impl VisitorMut for Normalizer
impl VisitorMut for Normalizer
Source§fn post_visit_query(&mut self, query: &mut Query) -> ControlFlow<Self::Break>
fn post_visit_query(&mut self, query: &mut Query) -> ControlFlow<Self::Break>
Invoked for any queries that appear in the AST after visiting children
Source§fn pre_visit_expr(&mut self, expr: &mut Expr) -> ControlFlow<Self::Break>
fn pre_visit_expr(&mut self, expr: &mut Expr) -> ControlFlow<Self::Break>
Invoked for any expressions that appear in the AST before visiting children
Source§fn post_visit_expr(&mut self, expr: &mut Expr) -> ControlFlow<Self::Break>
fn post_visit_expr(&mut self, expr: &mut Expr) -> ControlFlow<Self::Break>
Invoked for any expressions that appear in the AST
Source§fn pre_visit_query(&mut self, _query: &mut Query) -> ControlFlow<Self::Break>
fn pre_visit_query(&mut self, _query: &mut Query) -> ControlFlow<Self::Break>
Invoked for any queries that appear in the AST before visiting children
Source§fn pre_visit_relation(
&mut self,
_relation: &mut ObjectName,
) -> ControlFlow<Self::Break>
fn pre_visit_relation( &mut self, _relation: &mut ObjectName, ) -> ControlFlow<Self::Break>
Invoked for any relations (e.g. tables) that appear in the AST before visiting children
Source§fn post_visit_relation(
&mut self,
_relation: &mut ObjectName,
) -> ControlFlow<Self::Break>
fn post_visit_relation( &mut self, _relation: &mut ObjectName, ) -> ControlFlow<Self::Break>
Invoked for any relations (e.g. tables) that appear in the AST after visiting children
Source§fn pre_visit_table_factor(
&mut self,
_table_factor: &mut TableFactor,
) -> ControlFlow<Self::Break>
fn pre_visit_table_factor( &mut self, _table_factor: &mut TableFactor, ) -> ControlFlow<Self::Break>
Invoked for any table factors that appear in the AST before visiting children
Source§fn post_visit_table_factor(
&mut self,
_table_factor: &mut TableFactor,
) -> ControlFlow<Self::Break>
fn post_visit_table_factor( &mut self, _table_factor: &mut TableFactor, ) -> ControlFlow<Self::Break>
Invoked for any table factors that appear in the AST after visiting children
Source§fn pre_visit_statement(
&mut self,
_statement: &mut Statement,
) -> ControlFlow<Self::Break>
fn pre_visit_statement( &mut self, _statement: &mut Statement, ) -> ControlFlow<Self::Break>
Invoked for any statements that appear in the AST before visiting children
Source§fn post_visit_statement(
&mut self,
_statement: &mut Statement,
) -> ControlFlow<Self::Break>
fn post_visit_statement( &mut self, _statement: &mut Statement, ) -> ControlFlow<Self::Break>
Invoked for any statements that appear in the AST after visiting children
Auto Trait Implementations§
impl Freeze for Normalizer
impl RefUnwindSafe for Normalizer
impl Send for Normalizer
impl Sync for Normalizer
impl Unpin for Normalizer
impl UnwindSafe for Normalizer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more