mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-09 10:00:54 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
37 lines
816 B
C++
37 lines
816 B
C++
#pragma once
|
|
|
|
#include <Parsers/IAST.h>
|
|
#include <Storages/MergeTree/PartDestinationType.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
/** Element of TTL expression.
|
|
*/
|
|
class ASTTTLElement : public IAST
|
|
{
|
|
public:
|
|
PartDestinationType destination_type;
|
|
String destination_name;
|
|
|
|
ASTTTLElement(PartDestinationType destination_type_, const String & destination_name_)
|
|
: destination_type(destination_type_)
|
|
, destination_name(destination_name_)
|
|
{
|
|
}
|
|
|
|
String getID(char) const override { return "TTLElement"; }
|
|
|
|
ASTPtr clone() const override
|
|
{
|
|
auto clone = std::make_shared<ASTTTLElement>(*this);
|
|
clone->cloneChildren();
|
|
return clone;
|
|
}
|
|
|
|
protected:
|
|
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
|
};
|
|
|
|
}
|