pub enum QueryResult {
ResultSet {
handle: Option<ResultSetHandle>,
data: ResultData,
},
RowCount {
count: i64,
},
}Expand description
Result of a query execution.
Variants§
ResultSet
Result set from a SELECT query
Fields
§
handle: Option<ResultSetHandle>Handle for fetching more data (None if all data is in the response)
§
data: ResultDataResult data (may include first batch of rows)
RowCount
Row count from an INSERT/UPDATE/DELETE query
Implementations§
Source§impl QueryResult
impl QueryResult
Sourcepub fn result_set(handle: Option<ResultSetHandle>, data: ResultData) -> Self
pub fn result_set(handle: Option<ResultSetHandle>, data: ResultData) -> Self
Create a result set query result.
Sourcepub fn is_result_set(&self) -> bool
pub fn is_result_set(&self) -> bool
Check if this is a result set.
Sourcepub fn is_row_count(&self) -> bool
pub fn is_row_count(&self) -> bool
Check if this is a row count.
Sourcepub fn handle(&self) -> Option<ResultSetHandle>
pub fn handle(&self) -> Option<ResultSetHandle>
Get the result set handle if this is a result set. Returns None if all data was included in the initial response.
Sourcepub fn get_row_count(&self) -> Option<i64>
pub fn get_row_count(&self) -> Option<i64>
Get the row count if this is a row count result.
Sourcepub fn has_more_data(&self) -> bool
pub fn has_more_data(&self) -> bool
Check if this result has more data to fetch.
For column-major data, the number of rows is determined by the length of the first column (or 0 if no columns).
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 moreAuto 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