Ejemplo n.º 1
0
        private SelectResult HandleSelectStatement(ShowStatement statement)
        {
            List <SchemaRecord> tableSchemas = _catalogManager.GetTablesSchemaRecord();
            SelectResult        result       = new SelectResult();

            result.ColumnDeclarations = new List <AttributeDeclaration>()
            {
                new AttributeDeclaration()
                {
                    AttributeName = "Table", Type = AttributeTypes.Char, CharLimit = 80
                }
            };
            result.Rows = new List <List <AtomValue> >();
            foreach (SchemaRecord tableSchema in tableSchemas)
            {
                List <AtomValue> row = new List <AtomValue>();
                AtomValue        col = new AtomValue();
                col.Type        = AttributeTypes.Char;
                col.CharLimit   = 80;
                col.StringValue = tableSchema.Name;
                row.Add(col);
                result.Rows.Add(row);
            }
            return(result);
        }