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