mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
27 lines
681 B
C++
27 lines
681 B
C++
#include <DataTypes/DataTypeString.h>
|
|
#include <DataTypes/DataTypesNumber.h>
|
|
#include <Databases/DatabaseFactory.h>
|
|
#include <Storages/System/StorageSystemDatabaseEngines.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
ColumnsDescription StorageSystemDatabaseEngines::getColumnsDescription()
|
|
{
|
|
return ColumnsDescription
|
|
{
|
|
{"name", std::make_shared<DataTypeString>(), "The name of database engine."},
|
|
};
|
|
}
|
|
|
|
void StorageSystemDatabaseEngines::fillData(MutableColumns & res_columns, ContextPtr, const SelectQueryInfo &) const
|
|
{
|
|
for (const auto & [engine, _] : DatabaseFactory::instance().getDatabaseEngines())
|
|
{
|
|
int i = 0;
|
|
res_columns[i++]->insert(engine);
|
|
}
|
|
}
|
|
|
|
}
|