#pragma once #include #include #include 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 clone() const override { return cloneImpl(); } static constexpr const auto TYPE = AccessEntityType::SETTINGS_PROFILE; AccessEntityType getType() const override { return TYPE; } std::vector findDependencies() const override; bool hasDependencies(const std::unordered_set & ids) const override; void replaceDependencies(const std::unordered_map & old_to_new_ids) override; void copyDependenciesFrom(const IAccessEntity & src, const std::unordered_set & ids) override; void removeDependencies(const std::unordered_set & ids) override; void clearAllExceptDependencies() override; bool isBackupAllowed() const override { return elements.isBackupAllowed(); } }; using SettingsProfilePtr = std::shared_ptr; }