| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <DataTypes/DataTypeString.h> |
| 4 | #include <DataTypes/DataTypesNumber.h> |
| 5 | #include <ext/shared_ptr_helper.h> |
| 6 | #include <Storages/System/IStorageSystemOneBlock.h> |
| 7 | |
| 8 | |
| 9 | namespace DB |
| 10 | { |
| 11 | |
| 12 | class Context; |
| 13 | |
| 14 | /** Implements system table 'clusters' |
| 15 | * that allows to obtain information about available clusters |
| 16 | * (which may be specified in Distributed tables). |
| 17 | */ |
| 18 | class StorageSystemClusters : public ext::shared_ptr_helper<StorageSystemClusters>, public IStorageSystemOneBlock<StorageSystemClusters> |
| 19 | { |
| 20 | friend struct ext::shared_ptr_helper<StorageSystemClusters>; |
| 21 | public: |
| 22 | std::string getName() const override { return "SystemClusters"; } |
| 23 | |
| 24 | static NamesAndTypesList getNamesAndTypes(); |
| 25 | |
| 26 | protected: |
| 27 | using IStorageSystemOneBlock::IStorageSystemOneBlock; |
| 28 | |
| 29 | void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo & query_info) const override; |
| 30 | }; |
| 31 | |
| 32 | } |
| 33 |