pub struct QueryMetadata {
pub schema: Arc<Schema>,
pub total_rows: Option<i64>,
pub column_count: usize,
pub execution_time_ms: Option<u64>,
}Expand description
Metadata about a query execution.
Fields§
§schema: Arc<Schema>Schema of the result set
total_rows: Option<i64>Total number of rows (if known)
column_count: usizeNumber of columns
execution_time_ms: Option<u64>Execution time in milliseconds (if available)
Implementations§
Source§impl QueryMetadata
impl QueryMetadata
Sourcepub fn new(schema: Arc<Schema>, total_rows: Option<i64>) -> Self
pub fn new(schema: Arc<Schema>, total_rows: Option<i64>) -> Self
Create metadata from schema and row count.
Sourcepub fn with_execution_time(self, execution_time_ms: u64) -> Self
pub fn with_execution_time(self, execution_time_ms: u64) -> Self
Set execution time.
Sourcepub fn column_names(&self) -> Vec<&str>
pub fn column_names(&self) -> Vec<&str>
Get column names.
Sourcepub fn column_types(&self) -> Vec<&DataType>
pub fn column_types(&self) -> Vec<&DataType>
Get column types.
Trait Implementations§
Source§impl Clone for QueryMetadata
impl Clone for QueryMetadata
Source§fn clone(&self) -> QueryMetadata
fn clone(&self) -> QueryMetadata
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 QueryMetadata
impl RefUnwindSafe for QueryMetadata
impl Send for QueryMetadata
impl Sync for QueryMetadata
impl Unpin for QueryMetadata
impl UnsafeUnpin for QueryMetadata
impl UnwindSafe for QueryMetadata
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