pub struct QueryResult {
pub columns: Vec<ColumnInfo>,
pub rows: Vec<Row>,
pub rows_affected: u64,
pub has_more_rows: bool,
pub cursor_id: u16,
}Expand description
Result set from a query
Fields§
§columns: Vec<ColumnInfo>Column information
rows: Vec<Row>Rows returned
rows_affected: u64Number of rows affected (for DML)
has_more_rows: boolWhether there are more rows to fetch
cursor_id: u16Cursor ID for subsequent fetches (needed for fetch_more)
Implementations§
Source§impl QueryResult
impl QueryResult
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Get the number of columns
Sourcepub fn column_by_name(&self, name: &str) -> Option<&ColumnInfo>
pub fn column_by_name(&self, name: &str) -> Option<&ColumnInfo>
Get a column by name
Sourcepub fn column_index(&self, name: &str) -> Option<usize>
pub fn column_index(&self, name: &str) -> Option<usize>
Get column index by name
Trait Implementations§
Source§impl Debug for QueryResult
impl Debug 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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more