mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
37 lines
952 B
C++
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;
|
|
};}
|