ClickHouse/src/Access/SettingsProfile.h
2020-06-15 20:10:34 +03:00

27 lines
811 B
C++

#pragma once
#include <Access/IAccessEntity.h>
#include <Access/RolesOrUsersSet.h>
#include <Access/SettingsProfileElement.h>
namespace DB
{
/// Represents a settings profile created by command
/// CREATE SETTINGS PROFILE name SETTINGS x=value MIN=min MAX=max READONLY... TO roles
struct SettingsProfile : public IAccessEntity
{
SettingsProfileElements elements;
/// Which roles or users should use this settings profile.
RolesOrUsersSet to_roles;
bool equal(const IAccessEntity & other) const override;
std::shared_ptr<IAccessEntity> clone() const override { return cloneImpl<SettingsProfile>(); }
static constexpr const Type TYPE = Type::SETTINGS_PROFILE;
Type getType() const override { return TYPE; }
};
using SettingsProfilePtr = std::shared_ptr<const SettingsProfile>;
}