1#pragma once
2
3#include <Interpreters/IInterpreter.h>
4#include <Parsers/IAST_fwd.h>
5
6
7namespace DB
8{
9
10class Context;
11
12
13/** Return a list of tables or databases meets specified conditions.
14 * Interprets a query through replacing it to SELECT query from system.tables or system.databases.
15 */
16class InterpreterShowTablesQuery : public IInterpreter
17{
18public:
19 InterpreterShowTablesQuery(const ASTPtr & query_ptr_, Context & context_);
20
21 BlockIO execute() override;
22
23private:
24 ASTPtr query_ptr;
25 Context & context;
26
27 String getRewrittenQuery();
28};
29
30
31}
32