pub struct DatasetSchema {
pub name: String,
pub columns: Vec<ColumnInfo>,
pub by_name: HashMap<String, usize>,
}Fields§
§name: String§columns: Vec<ColumnInfo>§by_name: HashMap<String, usize>lowercase name → index in columns.
Implementations§
Source§impl DatasetSchema
impl DatasetSchema
pub fn new(name: impl Into<String>, columns: Vec<ColumnInfo>) -> Self
Sourcepub fn find(&self, name: &str) -> Result<&ColumnInfo, AppError>
pub fn find(&self, name: &str) -> Result<&ColumnInfo, AppError>
Case-insensitive lookup. Returns the canonical ColumnInfo.
Sourcepub fn quote_ident(name: &str) -> String
pub fn quote_ident(name: &str) -> String
Quoted identifier safe for WHERE / SELECT clauses.
Double-quotes embedded " per SQL spec.
Trait Implementations§
Source§impl Clone for DatasetSchema
impl Clone for DatasetSchema
Source§fn clone(&self) -> DatasetSchema
fn clone(&self) -> DatasetSchema
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 moreAuto Trait Implementations§
impl Freeze for DatasetSchema
impl RefUnwindSafe for DatasetSchema
impl Send for DatasetSchema
impl Sync for DatasetSchema
impl Unpin for DatasetSchema
impl UnsafeUnpin for DatasetSchema
impl UnwindSafe for DatasetSchema
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