| 1 | #pragma once | 
|---|---|
| 2 | |
| 3 | #include <ext/shared_ptr_helper.h> | 
| 4 | #include <Formats/FormatSettings.h> | 
| 5 | #include <Storages/IStorage.h> | 
| 6 | #include <Storages/MergeTree/MergeTreeData.h> | 
| 7 | |
| 8 | |
| 9 | namespace DB | 
| 10 | { | 
| 11 | |
| 12 | class Context; | 
| 13 | |
| 14 | |
| 15 | /** Implements the system table `storage`, which allows you to get information about all disks. | 
| 16 | */ | 
| 17 | class StorageSystemStoragePolicies : public ext::shared_ptr_helper<StorageSystemStoragePolicies>, public IStorage | 
| 18 | { | 
| 19 | friend struct ext::shared_ptr_helper<StorageSystemStoragePolicies>; | 
| 20 | public: | 
| 21 | std::string getName() const override { return "SystemStoragePolicies"; } | 
| 22 | std::string getTableName() const override { return name; } | 
| 23 | std::string getDatabaseName() const override { return "system"; } | 
| 24 | |
| 25 | BlockInputStreams read( | 
| 26 | const Names & column_names, | 
| 27 | const SelectQueryInfo & query_info, | 
| 28 | const Context & context, | 
| 29 | QueryProcessingStage::Enum processed_stage, | 
| 30 | size_t max_block_size, | 
| 31 | unsigned num_streams) override; | 
| 32 | |
| 33 | private: | 
| 34 | const std::string name; | 
| 35 | |
| 36 | protected: | 
| 37 | StorageSystemStoragePolicies(const std::string & name_); | 
| 38 | }; | 
| 39 | |
| 40 | } | 
| 41 | 
