pub struct ParsedSql {
pub statement_type: StatementType,
pub original_sql: String,
pub trimmed_sql: String,
pub has_distinct: bool,
pub has_group_by: bool,
pub has_order_by: bool,
pub has_union: bool,
pub has_for_update: bool,
pub has_limit: bool,
}Expand description
SQL 解析结果(对标 Java Statement 的简化版)。
Fields§
§statement_type: StatementType语句类型。
original_sql: String原始 SQL。
trimmed_sql: String去除前后空白和注释后的 SQL。
has_distinct: bool是否包含 DISTINCT。
has_group_by: bool是否包含 GROUP BY。
has_order_by: bool是否包含 ORDER BY。
has_union: bool是否包含 UNION。
has_for_update: bool是否包含 FOR UPDATE / FOR SHARE。
has_limit: bool是否包含 LIMIT 子句(已有的)。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ParsedSql
impl RefUnwindSafe for ParsedSql
impl Send for ParsedSql
impl Sync for ParsedSql
impl Unpin for ParsedSql
impl UnsafeUnpin for ParsedSql
impl UnwindSafe for ParsedSql
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