ClickHouse/src/Storages/System/StorageSystemDatabases.h

33 lines
775 B
C++
Raw Normal View History

2012-06-18 07:49:19 +00:00
#pragma once
2021-10-02 07:13:14 +00:00
#include <base/shared_ptr_helper.h>
#include <Storages/System/IStorageSystemOneBlock.h>
2012-06-18 07:49:19 +00:00
namespace DB
{
2016-12-08 02:49:04 +00:00
class Context;
2017-04-16 15:00:33 +00:00
/** Implements `databases` system table, which allows you to get information about all databases.
2012-06-18 07:49:19 +00:00
*/
2021-06-15 19:55:21 +00:00
class StorageSystemDatabases final : public shared_ptr_helper<StorageSystemDatabases>, public IStorageSystemOneBlock<StorageSystemDatabases>
2012-06-18 07:49:19 +00:00
{
2021-06-15 19:55:21 +00:00
friend struct shared_ptr_helper<StorageSystemDatabases>;
2012-06-18 07:49:19 +00:00
public:
std::string getName() const override
{
return "SystemDatabases";
}
2012-06-18 07:49:19 +00:00
static NamesAndTypesList getNamesAndTypes();
protected:
using IStorageSystemOneBlock::IStorageSystemOneBlock;
void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const override;
2012-06-18 07:49:19 +00:00
};
}