mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
41 lines
728 B
C++
41 lines
728 B
C++
#pragma once
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
#include <DB/Parsers/ASTQueryWithOutput.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
|
|
/** EXISTS запрос
|
|
*/
|
|
class ASTExistsQuery : public ASTQueryWithOutput
|
|
{
|
|
public:
|
|
String database;
|
|
String table;
|
|
|
|
ASTExistsQuery() {}
|
|
ASTExistsQuery(StringRange range_) : ASTQueryWithOutput(range_) {}
|
|
|
|
/** Получить текст, который идентифицирует этот элемент. */
|
|
String getID() const { return "ExistsQuery_" + database + "_" + table; };
|
|
|
|
ASTPtr clone() const
|
|
{
|
|
ASTExistsQuery * res = new ASTExistsQuery(*this);
|
|
res->children.clear();
|
|
|
|
if (format)
|
|
{
|
|
res->format = format->clone();
|
|
res->children.push_back(res->format);
|
|
}
|
|
|
|
return res;
|
|
}
|
|
};
|
|
|
|
}
|