pub struct QueryResult {
pub columns: Vec<String>,
pub rows: Vec<Vec<Value>>,
pub returned: usize,
pub truncated: bool,
}Expand description
The result of a DataStore::query — a row set capped at row_cap.
Honesty (Phase 21): there is no fabricated grand total. returned is
exactly how many rows are in rows, and truncated is true iff at
least one more row existed past the cap (detected by reading one extra row
and discarding it). Callers learn “there is more” without the engine ever
inventing a number it did not count.
Fields§
§columns: Vec<String>Column names, in SELECT order (empty for a non-row statement).
rows: Vec<Vec<Value>>The returned rows; each inner vec is one row aligned to columns.
Cell values are JSON: null, number, string, or a base64 string for
BLOB columns.
returned: usizerows.len() — the count actually returned.
truncated: booltrue iff more rows existed beyond row_cap (none of which are in
rows).
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<'de> Deserialize<'de> for QueryResult
impl<'de> Deserialize<'de> for QueryResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for QueryResult
impl PartialEq for QueryResult
Source§impl Serialize for QueryResult
impl Serialize 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 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