ClickHouse/src/Parsers/ASTDeleteQuery.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
792 B
C++
Raw Normal View History

#pragma once
#include <Parsers/IAST.h>
#include <Parsers/ASTQueryWithTableAndOutput.h>
2023-01-30 15:42:52 +00:00
#include <Parsers/ASTQueryWithOnCluster.h>
namespace DB
{
/// DELETE FROM [db.]name WHERE ...
2023-01-30 15:42:52 +00:00
class ASTDeleteQuery : public ASTQueryWithTableAndOutput, public ASTQueryWithOnCluster
{
public:
String getID(char delim) const final;
ASTPtr clone() const final;
2023-02-02 01:11:16 +00:00
QueryKind getQueryKind() const override { return QueryKind::Delete; }
2023-01-30 15:42:52 +00:00
ASTPtr getRewrittenASTWithoutOnCluster(const WithoutOnClusterASTRewriteParams & params) const override
{
return removeOnCluster<ASTDeleteQuery>(clone(), params.default_database);
}
ASTPtr predicate;
protected:
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
};
}