ClickHouse/dbms/include/DB/Parsers/ASTShowTablesQuery.h
Alexey Milovidov 310ed66b00 Revert "dbms: improvement (incomplete) [#METR-16164]."
This reverts commit 6f4f44ce7980cace32edd0913b8d1d53cd51682b.
2015-05-03 12:13:08 +03:00

45 lines
842 B
C++

#pragma once
#include <DB/Parsers/IAST.h>
#include <DB/Parsers/ASTQueryWithOutput.h>
namespace DB
{
/** Запрос SHOW TABLES или SHOW DATABASES
*/
class ASTShowTablesQuery : public ASTQueryWithOutput
{
public:
bool databases{false};
String from;
String like;
bool not_like{false};
ASTShowTablesQuery() = default;
ASTShowTablesQuery(const StringRange range_) : ASTQueryWithOutput(range_) {}
/** Получить текст, который идентифицирует этот элемент. */
String getID() const override { return "ShowTables"; };
ASTPtr clone() const override
{
ASTShowTablesQuery * res = new ASTShowTablesQuery(*this);
ASTPtr ptr{res};
res->children.clear();
if (format)
{
res->format = format->clone();
res->children.push_back(res->format);
}
return ptr;
}
};
}