2012-08-02 19:04:26 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Core/Field.h>
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/** SET запрос
|
|
|
|
*/
|
|
|
|
class ASTSetQuery : public IAST
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
struct Change
|
|
|
|
{
|
|
|
|
String name;
|
|
|
|
Field value;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef std::vector<Change> Changes;
|
|
|
|
Changes changes;
|
|
|
|
|
|
|
|
bool global; /// Если запрос SET GLOBAL.
|
|
|
|
|
2014-12-17 15:26:24 +00:00
|
|
|
ASTSetQuery() = default;
|
|
|
|
ASTSetQuery(const StringRange range_) : IAST(range_) {}
|
2015-05-03 09:13:08 +00:00
|
|
|
|
2012-08-02 19:04:26 +00:00
|
|
|
/** Получить текст, который идентифицирует этот элемент. */
|
2015-05-03 09:13:08 +00:00
|
|
|
String getID() const override { return "Set"; };
|
2012-08-02 19:04:26 +00:00
|
|
|
|
2014-12-17 15:26:24 +00:00
|
|
|
ASTPtr clone() const override { return new ASTSetQuery(*this); }
|
2012-08-02 19:04:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|