#[non_exhaustive]pub enum QueryResult {
CommandOk {
affected: usize,
modified_catalog: bool,
},
Rows {
columns: Vec<ColumnSchema>,
rows: Vec<Row>,
},
}Expand description
Result of executing one statement.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CommandOk
DDL or DML succeeded.
affected is the row count for INSERT and 0 elsewhere.
modified_catalog tells the server whether this statement
caused the committed catalog to change — it’s the signal to
snapshot/audit. False for BEGIN/ROLLBACK, false for writeful
statements executed inside a transaction (those only touch the
shadow), and true for COMMIT and for writes outside a TX.
Rows
SELECT returned a (possibly empty) row set.
Trait Implementations§
Source§impl Clone for QueryResult
impl Clone for QueryResult
Source§fn clone(&self) -> QueryResult
fn clone(&self) -> QueryResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryResult
impl Debug for QueryResult
Source§impl PartialEq for QueryResult
impl PartialEq for QueryResult
Source§fn eq(&self, other: &QueryResult) -> bool
fn eq(&self, other: &QueryResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for QueryResult
Auto Trait Implementations§
impl Freeze for QueryResult
impl RefUnwindSafe for QueryResult
impl Send for QueryResult
impl Sync for QueryResult
impl Unpin for QueryResult
impl UnsafeUnpin 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