pub struct Statement { /* private fields */ }Expand description
A prepared SQL statement
Prepared statements parse SQL once at prepare time and retain the compiled plan. Subsequent executions use the plan directly, bypassing normalize, hash, and cache-lookup overhead on every call.
§Thread Safety
Statement holds a weak reference to the Database and can be used from multiple threads, but each execution is serialized through the database’s executor lock.
§Lifetime
The Statement becomes invalid when the Database is dropped. Attempting to use a Statement after its Database is dropped will return an error.
Implementations§
Source§impl Statement
impl Statement
Trait Implementations§
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