mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
40 lines
630 B
C++
40 lines
630 B
C++
#pragma once
|
|
|
|
#include <DB/Parsers/IAST.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
|
|
/** RENAME запрос
|
|
*/
|
|
class ASTRenameQuery : public IAST
|
|
{
|
|
public:
|
|
struct Table
|
|
{
|
|
String database;
|
|
String table;
|
|
};
|
|
|
|
struct Element
|
|
{
|
|
Table from;
|
|
Table to;
|
|
};
|
|
|
|
typedef std::vector<Element> Elements;
|
|
Elements elements;
|
|
|
|
ASTRenameQuery() = default;
|
|
ASTRenameQuery(const StringRange range_) : IAST(range_) {}
|
|
|
|
/** Получить текст, который идентифицирует этот элемент. */
|
|
String getID() const override { return "Rename"; };
|
|
|
|
ASTPtr clone() const override { return new ASTRenameQuery(*this); }
|
|
};
|
|
|
|
}
|