ClickHouse/src/Parsers/ASTUndropQuery.h

31 lines
774 B
C++
Raw Normal View History

2023-03-21 12:14:26 +00:00
#pragma once
#include <Parsers/ASTQueryWithTableAndOutput.h>
#include <Parsers/ASTQueryWithOnCluster.h>
namespace DB
{
/** UNDROP query
*/
class ASTUndropQuery : public ASTQueryWithTableAndOutput, public ASTQueryWithOnCluster
{
public:
/** Get the text that identifies this element. */
String getID(char) const override;
ASTPtr clone() const override;
ASTPtr getRewrittenASTWithoutOnCluster(const WithoutOnClusterASTRewriteParams & params) const override
{
return removeOnCluster<ASTUndropQuery>(clone(), params.default_database);
}
QueryKind getQueryKind() const override { return QueryKind::Undrop; }
protected:
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
};
}