ClickHouse/src/Storages/System/StorageSystemDatabases.h
2023-08-02 23:23:52 +02:00

35 lines
742 B
C++

#pragma once
#include <Storages/System/IStorageSystemOneBlock.h>
namespace DB
{
class Context;
/** Implements `databases` system table, which allows you to get information about all databases.
*/
class StorageSystemDatabases final : public IStorageSystemOneBlock<StorageSystemDatabases>
{
public:
std::string getName() const override
{
return "SystemDatabases";
}
static NamesAndTypesList getNamesAndTypes();
static NamesAndAliases getNamesAndAliases();
protected:
using IStorageSystemOneBlock::IStorageSystemOneBlock;
bool supportsColumnsMask() const override { return true; }
void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const override;
};
}