pub struct QueryResult { /* private fields */ }
Expand description
Struct representing the result of a query operation.
Implementations§
Source§impl QueryResult
impl QueryResult
Sourcepub fn rows(&self) -> &Vec<MapValue>
pub fn rows(&self) -> &Vec<MapValue>
Get the query result rows, if any.
If the query returned no rows, this will return a reference to an empty vector. Otherwise, it will return a reference to the rows in the order specified by the query.
Sourcepub fn take_rows(&mut self) -> Vec<MapValue>
pub fn take_rows(&mut self) -> Vec<MapValue>
Take the query result rows, setting the result back to an empty vector.
If the query returned no rows, this will return an empty vector. Otherwise, it will return the rows in the vector, giving the ownership of the rows to the caller.
Sourcepub fn prepared_statement(&self) -> PreparedStatement
pub fn prepared_statement(&self) -> PreparedStatement
Get the prepared statement after execution of a query.
The prepared statement can then be used in subsequent query requests, saving the extra step of preparing each query again.
Trait Implementations§
Source§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
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