1 | #include <DataTypes/DataTypeString.h> |
---|---|
2 | #include <Storages/StorageFactory.h> |
3 | #include <Storages/System/StorageSystemTableEngines.h> |
4 | |
5 | namespace DB |
6 | { |
7 | |
8 | NamesAndTypesList StorageSystemTableEngines::getNamesAndTypes() |
9 | { |
10 | return {{"name", std::make_shared<DataTypeString>()}}; |
11 | } |
12 | |
13 | void StorageSystemTableEngines::fillData(MutableColumns & res_columns, const Context &, const SelectQueryInfo &) const |
14 | { |
15 | const auto & storages = StorageFactory::instance().getAllStorages(); |
16 | for (const auto & pair : storages) |
17 | { |
18 | res_columns[0]->insert(pair.first); |
19 | } |
20 | } |
21 | |
22 | } |
23 |