pub struct ExecResult { /* private fields */ }Expand description
Result of a non-SELECT statement: an INSERT, UPDATE, DELETE, or
DDL execution. Carries the row count
(rows_affected) and, where the backend supports
it, the last auto-generated primary key
(last_insert_id).
Implementationsยง
Sourceยงimpl ExecResult
impl ExecResult
Sourcepub fn last_insert_id(&self) -> u64
pub fn last_insert_id(&self) -> u64
The auto-increment primary key value assigned by the database on the
most recent INSERT.
ยงPanics
PostgreSQL does not expose last_insert_id directly โ use
exec_with_returning / exec_with_returning_keys instead.
Sourcepub fn rows_affected(&self) -> u64
pub fn rows_affected(&self) -> u64
Number of rows affected by the statement.
Trait Implementationsยง
Sourceยงimpl Debug for ExecResult
impl Debug for ExecResult
Sourceยงimpl From<ExecResult> for ProxyExecResult
Available on crate feature proxy only.
impl From<ExecResult> for ProxyExecResult
Available on crate feature
proxy only.Sourceยงfn from(result: ExecResult) -> Self
fn from(result: ExecResult) -> Self
Converts to this type from the input type.
Sourceยงimpl From<ProxyExecResult> for ExecResult
Available on crate feature proxy only.
impl From<ProxyExecResult> for ExecResult
Available on crate feature
proxy only.Sourceยงfn from(result: ProxyExecResult) -> Self
fn from(result: ProxyExecResult) -> Self
Converts to this type from the input type.
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ยง
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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