pub struct PatternRegistry { /* private fields */ }Expand description
Registry of SQL patterns
Implementations§
Source§impl PatternRegistry
impl PatternRegistry
Sourcepub fn register(&mut self, pattern: Box<dyn SqlPattern>)
pub fn register(&mut self, pattern: Box<dyn SqlPattern>)
Register a new pattern
Sourcepub fn find_pattern(
&self,
stmt: &Statement,
ctx: &MatchContext,
) -> Option<&dyn SqlPattern>
pub fn find_pattern( &self, stmt: &Statement, ctx: &MatchContext, ) -> Option<&dyn SqlPattern>
Find matching pattern for SQL
Sourcepub fn transform_sql(
&self,
sql: &str,
ctx: &TransformContext,
) -> Result<String, String>
pub fn transform_sql( &self, sql: &str, ctx: &TransformContext, ) -> Result<String, String>
Transform SQL to QAIL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PatternRegistry
impl !RefUnwindSafe for PatternRegistry
impl Send for PatternRegistry
impl Sync for PatternRegistry
impl Unpin for PatternRegistry
impl !UnwindSafe for PatternRegistry
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