pub struct ExecResult { /* private fields */ }Expand description
Execution result for DML operations (INSERT, UPDATE, DELETE)
This result type tracks the number of rows affected and the last insert ID for auto-increment columns.
Implementations§
Source§impl ExecResult
impl ExecResult
Sourcepub fn with_rows_affected(rows_affected: i64) -> Self
pub fn with_rows_affected(rows_affected: i64) -> Self
Create a result with just rows affected
Sourcepub fn with_last_insert_id(rows_affected: i64, last_insert_id: i64) -> Self
pub fn with_last_insert_id(rows_affected: i64, last_insert_id: i64) -> Self
Create a result with rows affected and last insert ID
Trait Implementations§
Source§impl QueryResult for ExecResult
impl QueryResult for ExecResult
Source§fn scan(&self, _dest: &mut [Value]) -> Result<()>
fn scan(&self, _dest: &mut [Value]) -> Result<()>
Scans the current row into the provided values Read more
Source§fn rows_affected(&self) -> i64
fn rows_affected(&self) -> i64
Returns the number of rows affected by an INSERT, UPDATE, or DELETE
Source§fn last_insert_id(&self) -> i64
fn last_insert_id(&self) -> i64
Returns the last inserted ID for an INSERT operation
Source§fn with_aliases(
self: Box<Self>,
_aliases: FxHashMap<String, String>,
) -> Box<dyn QueryResult>
fn with_aliases( self: Box<Self>, _aliases: FxHashMap<String, String>, ) -> Box<dyn QueryResult>
Sets column aliases for this result Read more
Auto Trait Implementations§
impl Freeze for ExecResult
impl RefUnwindSafe for ExecResult
impl Send for ExecResult
impl Sync for ExecResult
impl Unpin for ExecResult
impl UnsafeUnpin for ExecResult
impl UnwindSafe for ExecResult
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more