pub struct CombinedSchema {
pub table_schemas: HashMap<String, (usize, TableSchema)>,
pub total_columns: usize,
}Expand description
Represents the combined schema from multiple tables (for JOINs)
Fields§
§table_schemas: HashMap<String, (usize, TableSchema)>Map from table name to (start_index, TableSchema) start_index is where this table’s columns begin in the combined row
total_columns: usizeTotal number of columns across all tables
Implementations§
Source§impl CombinedSchema
impl CombinedSchema
Sourcepub fn from_table(table_name: String, schema: TableSchema) -> Self
pub fn from_table(table_name: String, schema: TableSchema) -> Self
Create a new combined schema from a single table
Sourcepub fn from_derived_table(
alias: String,
column_names: Vec<String>,
column_types: Vec<DataType>,
) -> Self
pub fn from_derived_table( alias: String, column_names: Vec<String>, column_types: Vec<DataType>, ) -> Self
Create a new combined schema from a derived table (subquery result)
Sourcepub fn combine(
left: CombinedSchema,
right_table: String,
right_schema: TableSchema,
) -> Self
pub fn combine( left: CombinedSchema, right_table: String, right_schema: TableSchema, ) -> Self
Combine two schemas (for JOIN operations)
Trait Implementations§
Source§impl Clone for CombinedSchema
impl Clone for CombinedSchema
Source§fn clone(&self) -> CombinedSchema
fn clone(&self) -> CombinedSchema
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 CombinedSchema
impl RefUnwindSafe for CombinedSchema
impl Send for CombinedSchema
impl Sync for CombinedSchema
impl Unpin for CombinedSchema
impl UnwindSafe for CombinedSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more