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 | /** Implements system table 'columns', that allows to get information about columns for every table. |
13 | */ |
14 | class StorageSystemColumns : public ext::shared_ptr_helper<StorageSystemColumns>, public IStorage |
15 | { |
16 | friend struct ext::shared_ptr_helper<StorageSystemColumns>; |
17 | public: |
18 | std::string getName() const override { return "SystemColumns"; } |
19 | std::string getTableName() const override { return name; } |
20 | std::string getDatabaseName() const override { return "system"; } |
21 | |
22 | BlockInputStreams read( |
23 | const Names & column_names, |
24 | const SelectQueryInfo & query_info, |
25 | const Context & context, |
26 | QueryProcessingStage::Enum processed_stage, |
27 | size_t max_block_size, |
28 | unsigned num_streams) override; |
29 | |
30 | private: |
31 | const std::string name; |
32 | |
33 | protected: |
34 | StorageSystemColumns(const std::string & name_); |
35 | }; |
36 | |
37 | } |
38 |