pub enum PreparedExecutionResult {
Select(SelectResult),
RowsAffected(usize),
Ok,
}Expand description
Execution result for prepared statements
Variants§
Select(SelectResult)
Result from a SELECT query
RowsAffected(usize)
Number of rows affected by INSERT/UPDATE/DELETE
Ok
DDL or other statement that doesn’t return rows
Implementations§
Source§impl PreparedExecutionResult
impl PreparedExecutionResult
Sourcepub fn rows_affected(&self) -> Option<usize>
pub fn rows_affected(&self) -> Option<usize>
Get rows affected if this is a DML result
Sourcepub fn into_select_result(self) -> Option<SelectResult>
pub fn into_select_result(self) -> Option<SelectResult>
Convert to SelectResult if this is a SELECT result
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PreparedExecutionResult
impl RefUnwindSafe for PreparedExecutionResult
impl Send for PreparedExecutionResult
impl Sync for PreparedExecutionResult
impl Unpin for PreparedExecutionResult
impl UnwindSafe for PreparedExecutionResult
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
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