ClickHouse/dbms/Parsers/ParserSettingsProfileElement.h
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

37 lines
952 B
C++

#pragma once
#include <Parsers/IParserBase.h>
namespace DB
{
/** Parses a string like this:
* {variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE]} | PROFILE 'profile_name'
*/
class ParserSettingsProfileElement : public IParserBase
{
public:
ParserSettingsProfileElement & useIDMode(bool enable_) { id_mode = enable_; return *this; }
protected:
const char * getName() const override { return "SettingsProfileElement"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
private:
bool id_mode = false;
};
class ParserSettingsProfileElements : public IParserBase
{
public:
ParserSettingsProfileElements & useIDMode(bool enable_) { id_mode = enable_; return *this; }
protected:
const char * getName() const override { return "SettingsProfileElements"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override;
private:
bool id_mode = false;
};}