pub enum QueryData {
NoHeaders {
rows: Vec<Vec<Value>>,
},
WithNames {
names: Vec<String>,
rows: Vec<Vec<Value>>,
},
WithNamesAndTypes {
names_and_types: Vec<(String, Type)>,
rows: Vec<Vec<Value>>,
},
}
Expand description
Query data
Variants§
NoHeaders
Without headers
WithNames
With columnn names
WithNamesAndTypes
With columnn names and types
Implementations§
Source§impl QueryData
impl QueryData
Sourcepub fn no_headers() -> Self
pub fn no_headers() -> Self
Creates a new [QueryTable] witout headers
Sourcepub fn with_names(names: Vec<&str>) -> Self
pub fn with_names(names: Vec<&str>) -> Self
Creates a new [QueryTable] with column names
Sourcepub fn with_names_and_types(names_and_types: Vec<(&str, Type)>) -> Self
pub fn with_names_and_types(names_and_types: Vec<(&str, Type)>) -> Self
Creates a new [QueryTable] with column names and types
Sourcepub fn from_schema(schema: &TableSchema) -> Self
pub fn from_schema(schema: &TableSchema) -> Self
Creates a new [QueryTable] from a TableSchema
Sourcepub fn get_rows_mut(&mut self) -> &mut Vec<Vec<Value>>
pub fn get_rows_mut(&mut self) -> &mut Vec<Vec<Value>>
Returns a mut reference to the rows
Sourcepub fn get_names_and_types(&self) -> Option<Vec<(&str, Type)>>
pub fn get_names_and_types(&self) -> Option<Vec<(&str, Type)>>
Gets a reference to the column names and types
Sourcepub fn into_parts(self) -> QueryDataParts
pub fn into_parts(self) -> QueryDataParts
Extracts the parts
Trait Implementations§
impl StructuralPartialEq for QueryData
Auto Trait Implementations§
impl Freeze for QueryData
impl RefUnwindSafe for QueryData
impl Send for QueryData
impl Sync for QueryData
impl Unpin for QueryData
impl UnwindSafe for QueryData
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