ClickHouse/dbms/include/DB/Parsers/ASTDropQuery.h
2012-12-27 16:23:12 +00:00

30 lines
614 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <DB/Parsers/IAST.h>
namespace DB
{
/** DROP запрос
*/
class ASTDropQuery : public IAST
{
public:
bool detach; /// Запрос DETACH, а не DROP.
bool if_exists;
String database;
String table;
ASTDropQuery() {}
ASTDropQuery(StringRange range_) : IAST(range_), detach(false), if_exists(false) {}
/** Получить текст, который идентифицирует этот элемент. */
String getID() const { return (detach ? "DetachQuery_" : "DropQuery_") + database + "_" + table; };
ASTPtr clone() const { return new ASTDropQuery(*this); }
};
}