2022-06-21 14:18:18 +00:00
|
|
|
#pragma once
|
2022-06-21 13:42:36 +00:00
|
|
|
#include <Parsers/ASTQueryWithOutput.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
class ASTDescribeCacheQuery : public ASTQueryWithOutput
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
String cache_name;
|
|
|
|
|
|
|
|
String getID(char) const override { return "DescribeCacheQuery"; }
|
|
|
|
|
|
|
|
ASTPtr clone() const override
|
|
|
|
{
|
|
|
|
auto res = std::make_shared<ASTDescribeCacheQuery>(*this);
|
|
|
|
cloneOutputOptions(*res);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override
|
|
|
|
{
|
2022-09-19 12:02:51 +00:00
|
|
|
settings.ostr << (settings.hilite ? hilite_keyword : "") << "DESCRIBE FILESYSTEM CACHE" << (settings.hilite ? hilite_none : "") << " " << cache_name;
|
2022-06-21 13:42:36 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|