Exemplo n.º 1
0
        // create statement
        private void HandleStatement(CreateStatement statement)
        {
            _catalogManager.CheckValidation(statement);
            switch (statement.CreateType)
            {
            case CreateType.Table:
                int newTableRoot = _recordManager.CreateTable();
                _catalogManager.CreateStatement(statement, newTableRoot);
                break;

            case CreateType.Index:
                SchemaRecord tableSchema  = _catalogManager.GetTableSchemaRecord(statement.TableName);
                int          newIndexRoot = _recordManager.CreateIndex(tableSchema.RootPage, statement.AttributeName, tableSchema.SQL.AttributeDeclarations);
                _catalogManager.CreateStatement(statement, newIndexRoot);
                break;
            }
        }