pub struct SchemaBuilder { /* private fields */ }Expand description
Builder for incrementally constructing a CombinedSchema
Builds schemas in O(n) time instead of O(n²) by tracking the column offset as tables are added.
Implementations§
Source§impl SchemaBuilder
impl SchemaBuilder
Sourcepub fn from_schema(schema: CombinedSchema) -> Self
pub fn from_schema(schema: CombinedSchema) -> Self
Create a schema builder initialized with an existing CombinedSchema
Note: Table names are already normalized via TableIdentifier
Sourcepub fn add_table(&mut self, name: String, schema: TableSchema) -> &mut Self
pub fn add_table(&mut self, name: String, schema: TableSchema) -> &mut Self
Add a table to the schema
This is an O(1) operation - columns are not copied, just indexed Note: Table names are automatically normalized via TableIdentifier for case-insensitive lookups
Sourcepub fn build(self) -> CombinedSchema
pub fn build(self) -> CombinedSchema
Build the final CombinedSchema
This consumes the builder and produces the schema in O(1) time
Sourcepub fn add_column_replacement(
&mut self,
hidden_idx: usize,
replacement_idx: usize,
)
pub fn add_column_replacement( &mut self, hidden_idx: usize, replacement_idx: usize, )
Add a column replacement for SELECT * expansion (for RIGHT/FULL OUTER JOINs)
Trait Implementations§
Source§impl Debug for SchemaBuilder
impl Debug for SchemaBuilder
Auto Trait Implementations§
impl Freeze for SchemaBuilder
impl RefUnwindSafe for SchemaBuilder
impl Send for SchemaBuilder
impl Sync for SchemaBuilder
impl Unpin for SchemaBuilder
impl UnwindSafe for SchemaBuilder
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> 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