aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Parsers/ParserShowEngineQuery.h
blob: e06326436f1ef4aa21f97fca7cf823437d5e01b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#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;
    }
};

}