mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 01:12:12 +00:00
23 lines
574 B
C++
23 lines
574 B
C++
|
#include <DataTypes/DataTypeString.h>
|
||
|
#include <Storages/StorageFactory.h>
|
||
|
#include <Storages/System/StorageSystemTableEngines.h>
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
|
||
|
NamesAndTypesList StorageSystemTableEngines::getNamesAndTypes()
|
||
|
{
|
||
|
return {{"name", std::make_shared<DataTypeString>()}};
|
||
|
}
|
||
|
|
||
|
void StorageSystemTableEngines::fillData(MutableColumns & res_columns, const Context &, const SelectQueryInfo &) const
|
||
|
{
|
||
|
const auto & storages = StorageFactory::instance().getAllStorages();
|
||
|
for (const auto & [name, creator] : storages)
|
||
|
{
|
||
|
res_columns[0]->insert(name);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|