ClickHouse/src/Storages/System/StorageSystemPrivileges.h

26 lines
838 B
C++
Raw Normal View History

2020-05-12 21:46:14 +00:00
#pragma once
2021-10-02 07:13:14 +00:00
#include <base/shared_ptr_helper.h>
2020-05-12 21:46:14 +00:00
#include <Storages/System/IStorageSystemOneBlock.h>
namespace DB
{
class Context;
/// Implements `privileges` system table, which allows you to get information about access types.
2021-06-15 19:55:21 +00:00
class StorageSystemPrivileges final : public shared_ptr_helper<StorageSystemPrivileges>, public IStorageSystemOneBlock<StorageSystemPrivileges>
2020-05-12 21:46:14 +00:00
{
public:
std::string getName() const override { return "SystemPrivileges"; }
static NamesAndTypesList getNamesAndTypes();
static const std::vector<std::pair<String, Int8>> & getAccessTypeEnumValues();
protected:
2021-06-15 19:55:21 +00:00
friend struct shared_ptr_helper<StorageSystemPrivileges>;
2020-05-12 21:46:14 +00:00
using IStorageSystemOneBlock::IStorageSystemOneBlock;
void fillData(MutableColumns & res_columns, ContextPtr context, const SelectQueryInfo &) const override;
2020-05-12 21:46:14 +00:00
};
}