/// Adds tables and columns to the `NamespaceSchema`. These are created
/// incrementally while validating the schema for a write and this helper
/// method takes them in to add them to the schema.
Adds tables and columns to the `NamespaceSchema`. These are created
incrementally while validating the schema for a write and this helper
method takes them in to add them to the schema.
Adds tables and columns to the ` NamespaceSchema ` . These are created incrementally while validating the schema for a write and this helper method takes them in to add them to the schema .
pub fn add_tables_and_columns(
        &mut self,
        new_tables: BTreeMap<String, TableId>,
        new_columns: BTreeMap<TableId, BTreeMap<String, ColumnSchema>>,
    ) {
        for (table_name, table_id) in new_tables {
            self.tables
                .entry(table_name)
                .or_insert_with(|| TableSchema::new(table_id));
        }
        for (table_id, new_columns) in new_columns {
            let table = self
                .get_table_mut(table_id)
                .expect("table must be in namespace to add columns");
            table.add_columns(new_columns);
        }
    }
pub fn add_tables_and_columns ( & mut self , new_tables : BTreeMap < String , TableId > , new_columns : BTreeMap < TableId , BTreeMap < String , ColumnSchema > > , ) { for ( table_name , table_id ) in new_tables { self . tables . entry ( table_name ) . or_insert_with ( | | TableSchema :: new ( table_id ) ) ; } for ( table_id , new_columns ) in new_columns { let table = self . get_table_mut ( table_id ) . expect ( " " ) ; table . add_columns ( new_columns ) ; } }
Adds tables and columns to the `NamespaceSchema`.
Adds tables and columns to the ` NamespaceSchema ` .
&mut self
new_tables
BTreeMap<String, TableId>
new_columns
BTreeMap<TableId, BTreeMap<String, ColumnSchema>>