#include #include #include namespace DB { ASTPtr ASTConstraintDeclaration::clone() const { auto res = std::make_shared(); res->name = name; res->type = type; if (expr) res->set(res->expr, expr->clone()); return res; } void ASTConstraintDeclaration::formatImpl(const FormatSettings & s, FormatState & state, FormatStateStacked frame) const { s.ostr << backQuoteIfNeed(name); s.ostr << (s.hilite ? hilite_keyword : "") << (type == Type::CHECK ? " CHECK " : " ASSUME ") << (s.hilite ? hilite_none : ""); expr->formatImpl(s, state, frame); } }