ClickHouse/src/Parsers/ParserShowEngineQuery.h
2023-01-31 18:35:10 +03:00

33 lines
646 B
C++

#pragma once
#include <Parsers/IParserBase.h>
#include <Parsers/CommonParsers.h>
#include <Parsers/ExpressionElementParsers.h>
#include <Parsers/ASTShowEngineQuery.h>
namespace DB
{
/** Query SHOW ENGINES
*/
class ParserShowEnginesQuery : public IParserBase
{
protected:
const char * getName() const override { return "SHOW ENGINES query"; }
bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override
{
auto query = std::make_shared<ASTShowEnginesQuery>();
if (!ParserKeyword("SHOW ENGINES").ignore(pos, expected))
return false;
node = query;
return true;
}
};
}