private void AddToSchema(SchemaFile file, IStatement statement) { var statementSchema = statement .Collect(file) .Create(file) .ToDictionary(k => k.GetQualifiedIdentfier()); file .Schema .AddRange(statementSchema); }
private IDictionary <string, SchemaObject> CreateFromStatement( IStatement statement, DatabaseSchemaSettings settings, string fileName, string fileContent, ParserOutput parserOutput ) { var files = CreateFiles(fileName, fileContent, parserOutput, settings); // TODO : consolidate Collect() and Create()? var newSchema = files .SelectMany(file => statement .Collect(file) .Create(file) ) .ToDictionary(k => k.GetQualifiedIdentfier()); _databaseSchema.AddRange(newSchema); return(newSchema); }