1#pragma once
2
3#include <ext/shared_ptr_helper.h>
4#include <Storages/System/IStorageSystemOneBlock.h>
5
6
7namespace DB
8{
9
10class Context;
11
12
13/** Implements `databases` system table, which allows you to get information about all databases.
14 */
15class StorageSystemDatabases : public ext::shared_ptr_helper<StorageSystemDatabases>, public IStorageSystemOneBlock<StorageSystemDatabases>
16{
17 friend struct ext::shared_ptr_helper<StorageSystemDatabases>;
18public:
19 std::string getName() const override
20 {
21 return "SystemDatabases";
22 }
23
24 static NamesAndTypesList getNamesAndTypes();
25
26protected:
27 using IStorageSystemOneBlock::IStorageSystemOneBlock;
28
29 void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo &) const override;
30};
31
32}
33