InterpreterShowProcesslistQuery.h 759 字节
Newer Older
1 2
#pragma once

3
#include <Interpreters/IInterpreter.h>
4
#include <Parsers/IAST_fwd.h>
5 6 7 8


namespace DB
{
9

10
class Context;
11

12 13

/** Return list of currently executing queries.
14
  */
15
class InterpreterShowProcesslistQuery : public IInterpreter
16 17
{
public:
18
    InterpreterShowProcesslistQuery(const ASTPtr & query_ptr_, Context & context_)
19
        : query_ptr(query_ptr_), context(context_) {}
20

21
    BlockIO execute() override;
22

23 24 25 26 27
    /// We ignore the quota and limits here because execute() will rewrite a show query as a SELECT query and then
    /// the SELECT query will checks the quota and limits.
    bool ignoreQuota() const override { return true; }
    bool ignoreLimits() const override { return true; }

28
private:
29
    ASTPtr query_ptr;
30
    Context & context;
31 32 33 34
};


}