mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
310ed66b00
This reverts commit 6f4f44ce7980cace32edd0913b8d1d53cd51682b.
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); }
|
|
};
|
|
|
|
}
|