#[non_exhaustive]pub struct Statement {
pub sql: String,
pub args: Vec<Value>,
pub query_type: QueryType,
}Expand description
What crosses the executor boundary: exactly what build() produces, plus
the statement-kind hint core already carries.
Owned, so an executor’s future borrows nothing from the caller’s query.
Constructing one by hand — Statement::new — is the raw-SQL escape
hatch, mirroring core’s “the build() seam is always open”: the SQL is
passed to the driver verbatim, in the backend’s own placeholder syntax,
with the arguments bound per docs/type-mappings.md.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.sql: StringThe SQL text, placeholders included.
args: Vec<Value>The arguments, one per placeholder.
query_type: QueryTypeWhich statement this is. Feeds tracing; never policed against the SQL.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Statement
Auto Trait Implementations§
impl !RefUnwindSafe for Statement
impl !UnwindSafe for Statement
impl Freeze for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnsafeUnpin for Statement
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