mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 21:42:39 +00:00
202f52dc3a
Modeled after (*) Fixes #46437 (*) https://dev.mysql.com/doc/refman/8.0/en/show-columns.html
35 lines
798 B
C++
35 lines
798 B
C++
#pragma once
|
|
|
|
#include <Interpreters/IInterpreter.h>
|
|
#include <Parsers/IAST_fwd.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
class Context;
|
|
|
|
|
|
/** Return a list of tables or databases meets specified conditions.
|
|
* Interprets a query through replacing it to SELECT query from system.tables or system.databases.
|
|
*/
|
|
class InterpreterShowTablesQuery : public IInterpreter, WithMutableContext
|
|
{
|
|
public:
|
|
InterpreterShowTablesQuery(const ASTPtr & query_ptr_, ContextMutablePtr context_);
|
|
|
|
BlockIO execute() override;
|
|
|
|
/// Ignore quota and limits here because execute() produces a SELECT query which checks quotas/limits by itself.
|
|
bool ignoreQuota() const override { return true; }
|
|
bool ignoreLimits() const override { return true; }
|
|
|
|
private:
|
|
ASTPtr query_ptr;
|
|
|
|
String getRewrittenQuery();
|
|
};
|
|
|
|
|
|
}
|