2022-11-11 21:19:58 +00:00
|
|
|
#include <Parsers/ASTDropNamedCollectionQuery.h>
|
|
|
|
#include <Common/quoteString.h>
|
|
|
|
#include <IO/Operators.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
ASTPtr ASTDropNamedCollectionQuery::clone() const
|
|
|
|
{
|
|
|
|
return std::make_shared<ASTDropNamedCollectionQuery>(*this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void ASTDropNamedCollectionQuery::formatImpl(const IAST::FormatSettings & settings, IAST::FormatState &, IAST::FormatStateStacked) const
|
|
|
|
{
|
|
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << "DROP NAMED COLLECTION ";
|
2023-07-27 19:11:07 +00:00
|
|
|
if (if_exists)
|
|
|
|
settings.ostr << "IF EXISTS ";
|
2022-11-11 21:19:58 +00:00
|
|
|
settings.ostr << (settings.hilite ? hilite_identifier : "") << backQuoteIfNeed(collection_name) << (settings.hilite ? hilite_none : "");
|
|
|
|
formatOnCluster(settings);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|