pub struct QueryResult {
pub rows: Vec<QueryRow>,
pub rows_affected: u64,
pub execution_time_ms: u64,
pub metadata: QueryMetadata,
}Expand description
Query result containing rows and metadata
Fields§
§rows: Vec<QueryRow>Result rows
rows_affected: u64Number of rows affected (for INSERT/UPDATE/DELETE)
execution_time_ms: u64Query execution time in milliseconds
metadata: QueryMetadataQuery metadata
Implementations§
Source§impl QueryResult
impl QueryResult
Sourcepub fn with_affected_rows(rows_affected: u64) -> Self
pub fn with_affected_rows(rows_affected: u64) -> Self
Create a result for DML operations (INSERT/UPDATE/DELETE)
Sourcepub fn columns(&self) -> &[ColumnInfo]
pub fn columns(&self) -> &[ColumnInfo]
Get column information
Sourcepub fn column_names(&self) -> Vec<String>
pub fn column_names(&self) -> Vec<String>
Get column names
Sourcepub fn execution_time(&self) -> u64
pub fn execution_time(&self) -> u64
Get execution time in milliseconds
Sourcepub fn performance(&self) -> &PerformanceMetrics
pub fn performance(&self) -> &PerformanceMetrics
Get performance metrics
Sourcepub fn add_warning(&mut self, warning: String)
pub fn add_warning(&mut self, warning: String)
Add a warning
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 Default for QueryResult
impl Default 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 Display for QueryResult
impl Display for QueryResult
Source§impl IntoIterator for QueryResult
impl IntoIterator for QueryResult
Source§impl<'a> IntoIterator for &'a QueryResult
impl<'a> IntoIterator for &'a 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§
impl<T> Allocation for T
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