pub struct SqlStatementInfo {
pub statement_type: SqlStatementType,
pub verb: String,
pub tables: HashSet<String>,
pub columns: HashSet<String>,
pub has_where: bool,
pub has_limit: bool,
pub has_order_by: bool,
pub has_aggregation: bool,
pub join_count: u32,
pub subquery_count: u32,
pub estimated_rows: u64,
pub sql_length: usize,
}Expand description
Structural information extracted from a parsed SQL statement.
Fields§
§statement_type: SqlStatementTypeHigh-level statement category.
verb: StringRaw uppercase verb (“SELECT”, “INSERT”, “CREATE TABLE”, etc.) — used
for explanations. For Cedar entity building use Self::statement_type.
tables: HashSet<String>All tables referenced by name (final path segment if qualified).
columns: HashSet<String>All columns referenced (where determinable). * recorded for wildcards.
has_where: boolWhether the statement has a WHERE clause.
has_limit: boolWhether the statement has a LIMIT clause.
has_order_by: boolWhether the statement has an ORDER BY clause.
has_aggregation: boolWhether the statement includes GROUP BY or aggregate functions.
join_count: u32Number of JOIN clauses across all FROM items.
subquery_count: u32Number of subqueries (naive count of nested SELECTs).
estimated_rows: u64Row-count estimate: LIMIT n when present, otherwise a configurable default.
sql_length: usizeRaw length of the SQL string (characters).
Trait Implementations§
Source§impl Clone for SqlStatementInfo
impl Clone for SqlStatementInfo
Source§fn clone(&self) -> SqlStatementInfo
fn clone(&self) -> SqlStatementInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SqlStatementInfo
impl RefUnwindSafe for SqlStatementInfo
impl Send for SqlStatementInfo
impl Sync for SqlStatementInfo
impl Unpin for SqlStatementInfo
impl UnsafeUnpin for SqlStatementInfo
impl UnwindSafe for SqlStatementInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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