| 1 | #pragma once |
|---|---|
| 2 | |
| 3 | #include <DataTypes/DataTypeArray.h> |
| 4 | #include <DataTypes/DataTypeString.h> |
| 5 | #include <DataTypes/DataTypesNumber.h> |
| 6 | #include <Storages/System/IStorageSystemOneBlock.h> |
| 7 | #include <Storages/MergeTree/MergeTreeData.h> |
| 8 | #include <ext/shared_ptr_helper.h> |
| 9 | |
| 10 | namespace DB |
| 11 | { |
| 12 | |
| 13 | /// Provides information about Graphite configuration. |
| 14 | class StorageSystemGraphite : public ext::shared_ptr_helper<StorageSystemGraphite>, public IStorageSystemOneBlock<StorageSystemGraphite> |
| 15 | { |
| 16 | friend struct ext::shared_ptr_helper<StorageSystemGraphite>; |
| 17 | public: |
| 18 | std::string getName() const override { return "SystemGraphite"; } |
| 19 | |
| 20 | static NamesAndTypesList getNamesAndTypes(); |
| 21 | |
| 22 | struct Config |
| 23 | { |
| 24 | Graphite::Params graphite_params; |
| 25 | Array databases; |
| 26 | Array tables; |
| 27 | }; |
| 28 | |
| 29 | using Configs = std::map<const String, Config>; |
| 30 | |
| 31 | |
| 32 | protected: |
| 33 | using IStorageSystemOneBlock::IStorageSystemOneBlock; |
| 34 | |
| 35 | void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo & query_info) const override; |
| 36 | StorageSystemGraphite::Configs getConfigs(const Context & context) const; |
| 37 | }; |
| 38 | |
| 39 | } |
| 40 |