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
9namespace DB
10{
11
12class Context;
13
14
15/** Implements the system table `disks`, which allows you to get information about all disks.
16*/
17class StorageSystemDisks : public ext::shared_ptr_helper<StorageSystemDisks>, public IStorage
18{
19 friend struct ext::shared_ptr_helper<StorageSystemDisks>;
20public:
21 std::string getName() const override { return "SystemDisks"; }
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
33private:
34 const std::string name;
35
36protected:
37 StorageSystemDisks(const std::string & name_);
38};
39
40}
41