pub enum QueryResult {
Select(ResultSet),
Affected(u64),
Empty,
}Expand description
The result of a query execution.
Variants§
Select(ResultSet)
A result set with rows.
Affected(u64)
The number of rows affected by an INSERT/UPDATE/DELETE.
Empty
An empty result (e.g., from DDL statements).
Implementations§
Source§impl QueryResult
impl QueryResult
Sourcepub fn as_select(&self) -> Option<&ResultSet>
pub fn as_select(&self) -> Option<&ResultSet>
Returns the result set if this is a select result.
Sourcepub fn into_select(self) -> Option<ResultSet>
pub fn into_select(self) -> Option<ResultSet>
Consumes and returns the result set if this is a select result.
Sourcepub const fn affected_rows(&self) -> Option<u64>
pub const fn affected_rows(&self) -> Option<u64>
Returns the affected row count if this is an affected result.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryResult
impl RefUnwindSafe for QueryResult
impl Send for QueryResult
impl Sync for QueryResult
impl Unpin for QueryResult
impl UnwindSafe for QueryResult
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