1 | #pragma once |
---|---|
2 | |
3 | #include <Parsers/IParserBase.h> |
4 | #include <Parsers/CommonParsers.h> |
5 | #include <Parsers/ExpressionElementParsers.h> |
6 | #include <Parsers/ASTShowProcesslistQuery.h> |
7 | |
8 | |
9 | namespace DB |
10 | { |
11 | |
12 | /** Query SHOW PROCESSLIST |
13 | */ |
14 | class ParserShowProcesslistQuery : public IParserBase |
15 | { |
16 | protected: |
17 | const char * getName() const { return "SHOW PROCESSLIST query"; } |
18 | |
19 | bool parseImpl(Pos & pos, ASTPtr & node, Expected & expected) |
20 | { |
21 | auto query = std::make_shared<ASTShowProcesslistQuery>(); |
22 | |
23 | if (!ParserKeyword("SHOW PROCESSLIST").ignore(pos, expected)) |
24 | return false; |
25 | |
26 | node = query; |
27 | |
28 | return true; |
29 | } |
30 | }; |
31 | |
32 | } |
33 |