2018-07-25 16:08:23 +00:00
|
|
|
#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();
|
2018-07-26 15:15:48 +00:00
|
|
|
for (const auto & pair : storages)
|
2018-07-25 16:08:23 +00:00
|
|
|
{
|
2018-07-26 15:15:48 +00:00
|
|
|
res_columns[0]->insert(pair.first);
|
2018-07-25 16:08:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|