aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Parsers/Access/ParserShowAccessQuery.h
blob: da0d6ff449f539adc2aefa8741f33c55ee21afed (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/Access/ASTShowAccessQuery.h>
#include <Parsers/CommonParsers.h>
#include <Parsers/ExpressionElementParsers.h>


namespace DB
{

/** Query SHOW ACCESS
  */
class ParserShowAccessQuery : public IParserBase
{
protected:
    const char * getName() const override { return "SHOW ACCESS query"; }

    bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) override
    {
        auto query = std::make_shared<ASTShowAccessQuery>();

        if (!ParserKeyword("SHOW ACCESS").ignore(pos, expected))
            return false;

        node = query;

        return true;
    }
};

}