#[non_exhaustive]pub struct QueryResult {
pub columns: Vec<Column>,
pub rows: Vec<Row>,
pub message: String,
pub partial_result: bool,
pub status: Option<Status>,
/* private fields */
}Expand description
QueryResult contains the result of executing a single SQL statement.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.columns: Vec<Column>List of columns included in the result. This also includes the data type of the column.
rows: Vec<Row>Rows returned by the SQL statement.
message: StringMessage related to the SQL execution result.
partial_result: boolSet to true if the SQL execution’s result is truncated due to size limits or an error retrieving results.
status: Option<Status>If results were truncated due to an error, details of that error.
Implementations§
Source§impl QueryResult
impl QueryResult
pub fn new() -> Self
Sourcepub fn set_columns<T, V>(self, v: T) -> Self
pub fn set_columns<T, V>(self, v: T) -> Self
Sourcepub fn set_message<T: Into<String>>(self, v: T) -> Self
pub fn set_message<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_partial_result<T: Into<bool>>(self, v: T) -> Self
pub fn set_partial_result<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
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 · 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 Default for QueryResult
impl Default for QueryResult
Source§fn default() -> QueryResult
fn default() -> QueryResult
Returns the “default value” for a type. Read more
Source§impl Message for QueryResult
impl Message for QueryResult
Source§impl PartialEq for QueryResult
impl PartialEq for QueryResult
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 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