mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
43 lines
847 B
C++
43 lines
847 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;
|
|
String from;
|
|
String like;
|
|
bool not_like;
|
|
|
|
ASTShowTablesQuery() : databases(false), not_like(false) {}
|
|
ASTShowTablesQuery(StringRange range_) : ASTQueryWithOutput(range_), databases(false), not_like(false) {}
|
|
|
|
/** Получить текст, который идентифицирует этот элемент. */
|
|
String getID() const { return "ShowTables"; };
|
|
|
|
ASTPtr clone() const
|
|
{
|
|
ASTShowTablesQuery * res = new ASTShowTablesQuery(*this);
|
|
res->children.clear();
|
|
|
|
if (format)
|
|
{
|
|
res->format = format->clone();
|
|
res->children.push_back(res->format);
|
|
}
|
|
|
|
return res;
|
|
}
|
|
};
|
|
|
|
}
|