pub struct SqlStmt {
pub text: String,
pub params: Vec<Value>,
pub is_write: bool,
pub row_shape: Option<RowShape>,
pub returning: Vec<String>,
}Expand description
一条参数化 SQL 语句(参数位置用 ? / $n 占位,params 顺序对应)
Fields§
§text: StringSQL 文本(标识符已按后端加引号,值全部参数化)
params: Vec<Value>绑定参数(按占位顺序)
is_write: bool是否为写语句
row_shape: Option<RowShape>SELECT 时的「列 → JSON 还原路径」元数据(见 row_shape)
returning: Vec<String>RETURNING 列(PG/SQLite 写语句回读用;MySQL 无)
Implementations§
Trait Implementations§
impl StructuralPartialEq for SqlStmt
Auto Trait Implementations§
impl Freeze for SqlStmt
impl RefUnwindSafe for SqlStmt
impl Send for SqlStmt
impl Sync for SqlStmt
impl Unpin for SqlStmt
impl UnsafeUnpin for SqlStmt
impl UnwindSafe for SqlStmt
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