pub struct QueryAnalyzer { /* private fields */ }Expand description
Query analyzer for schema-aware routing
Implementations§
Source§impl QueryAnalyzer
impl QueryAnalyzer
Sourcepub fn new(schema: Arc<SchemaRegistry>) -> Self
pub fn new(schema: Arc<SchemaRegistry>) -> Self
Create a new query analyzer
Sourcepub fn analyze(&self, query: &str) -> QueryAnalysis
pub fn analyze(&self, query: &str) -> QueryAnalysis
Analyze a query and determine routing requirements
Sourcepub fn extract_tables(&self, query: &str) -> Vec<TableRef>
pub fn extract_tables(&self, query: &str) -> Vec<TableRef>
Extract tables from query
Sourcepub fn has_aggregations(&self, query: &str) -> bool
pub fn has_aggregations(&self, query: &str) -> bool
Check if query has aggregations
Sourcepub fn is_read_only(&self, query: &str) -> bool
pub fn is_read_only(&self, query: &str) -> bool
Check if query is read-only
Sourcepub fn has_subqueries(&self, query: &str) -> bool
pub fn has_subqueries(&self, query: &str) -> bool
Check if query has subqueries
Sourcepub fn extract_columns(&self, query: &str) -> Vec<String>
pub fn extract_columns(&self, query: &str) -> Vec<String>
Extract columns from query
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryAnalyzer
impl !RefUnwindSafe for QueryAnalyzer
impl Send for QueryAnalyzer
impl Sync for QueryAnalyzer
impl Unpin for QueryAnalyzer
impl UnsafeUnpin for QueryAnalyzer
impl !UnwindSafe for QueryAnalyzer
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more