pub struct SqlAnalysis {
pub operation: SqlOperation,
pub tables: Vec<String>,
pub projected_columns: Vec<(String, String)>,
pub has_where: bool,
pub where_canonical: String,
}Expand description
Normalized view of a parsed SQL statement.
Fields§
§operation: SqlOperationOperation class.
tables: Vec<String>All tables referenced anywhere in the statement. Names are left as the parser produced them (case preserved); case-insensitive compare happens in the config layer.
projected_columns: Vec<(String, String)>Projected columns per source table, for SELECT queries only.
Each entry is (table, column). column == "*" means the query
uses a wildcard projection. The table is the source table as
resolved from the FROM list (aliases are resolved back to the
underlying table). When the projection cannot be resolved to a
specific table, the special sentinel "?" is used so the guard
can conservatively apply column checks across every referenced
table.
has_where: boolWhether the statement contains a WHERE clause. Applies to
SELECT, UPDATE, DELETE. INSERT always reports false.
where_canonical: StringCanonicalized WHERE text, lower-cased and whitespace-collapsed, or an empty string when absent. Used against the predicate denylist.
Trait Implementations§
Source§impl Clone for SqlAnalysis
impl Clone for SqlAnalysis
Source§fn clone(&self) -> SqlAnalysis
fn clone(&self) -> SqlAnalysis
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SqlAnalysis
impl Debug for SqlAnalysis
Source§impl PartialEq for SqlAnalysis
impl PartialEq for SqlAnalysis
impl Eq for SqlAnalysis
impl StructuralPartialEq for SqlAnalysis
Auto Trait Implementations§
impl Freeze for SqlAnalysis
impl RefUnwindSafe for SqlAnalysis
impl Send for SqlAnalysis
impl Sync for SqlAnalysis
impl Unpin for SqlAnalysis
impl UnsafeUnpin for SqlAnalysis
impl UnwindSafe for SqlAnalysis
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.