2011-08-28 08:50:27 +00:00
|
|
|
#pragma once
|
2010-06-24 19:12:10 +00:00
|
|
|
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
using Poco::SharedPtr;
|
|
|
|
|
|
|
|
|
|
|
|
/** Список выражений типа "a, b + c, f(d)"
|
|
|
|
*/
|
|
|
|
class ASTExpressionList : public IAST
|
|
|
|
{
|
|
|
|
public:
|
2014-12-15 20:43:24 +00:00
|
|
|
ASTExpressionList() = default;
|
2014-12-17 15:26:24 +00:00
|
|
|
ASTExpressionList(const StringRange range_) : IAST(range_) {}
|
2010-06-24 19:12:10 +00:00
|
|
|
|
2011-08-09 19:19:00 +00:00
|
|
|
/** Получить текст, который идентифицирует этот элемент. */
|
2014-12-15 20:43:24 +00:00
|
|
|
String getID() const override { return "ExpressionList"; }
|
2011-12-12 06:15:34 +00:00
|
|
|
|
2014-12-15 20:43:24 +00:00
|
|
|
ASTPtr clone() const override
|
2011-12-12 06:15:34 +00:00
|
|
|
{
|
2014-12-15 20:43:24 +00:00
|
|
|
const auto res = new ASTExpressionList(*this);
|
|
|
|
ASTPtr ptr{res};
|
2011-12-12 06:15:34 +00:00
|
|
|
res->children.clear();
|
|
|
|
|
2014-12-15 20:43:24 +00:00
|
|
|
for (const auto & child : children)
|
|
|
|
res->children.emplace_back(child->clone());
|
2011-12-12 06:15:34 +00:00
|
|
|
|
2014-12-15 20:43:24 +00:00
|
|
|
return ptr;
|
2011-12-12 06:15:34 +00:00
|
|
|
}
|
2010-06-24 19:12:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|