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 | |
13 | /** Implements the `quota_usage` system tables, which allows you to get information about |
14 | * how the quotas are used by all users. |
15 | */ |
16 | class StorageSystemQuotaUsage : public ext::shared_ptr_helper<StorageSystemQuotaUsage>, public IStorageSystemOneBlock<StorageSystemQuotaUsage> |
17 | { |
18 | public: |
19 | std::string getName() const override { return "SystemQuotaUsage"; } |
20 | static NamesAndTypesList getNamesAndTypes(); |
21 | |
22 | protected: |
23 | friend struct ext::shared_ptr_helper<StorageSystemQuotaUsage>; |
24 | using IStorageSystemOneBlock::IStorageSystemOneBlock; |
25 | void fillData(MutableColumns & res_columns, const Context & context, const SelectQueryInfo &) const override; |
26 | }; |
27 | |
28 | } |
29 |