mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 20:42:04 +00:00
202f52dc3a
Modeled after (*) Fixes #46437 (*) https://dev.mysql.com/doc/refman/8.0/en/show-columns.html
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <iomanip>
|
|
#include <Parsers/IAST.h>
|
|
#include <Parsers/ASTQueryWithOutput.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
|
|
/** Query SHOW TABLES or SHOW DATABASES or SHOW CLUSTERS or SHOW CACHES
|
|
*/
|
|
class ASTShowTablesQuery : public ASTQueryWithOutput
|
|
{
|
|
public:
|
|
bool databases = false;
|
|
bool clusters = false;
|
|
bool cluster = false;
|
|
bool dictionaries = false;
|
|
bool m_settings = false;
|
|
bool changed = false;
|
|
bool temporary = false;
|
|
bool caches = false;
|
|
bool full = false;
|
|
|
|
String cluster_str;
|
|
String from;
|
|
String like;
|
|
|
|
bool not_like = false;
|
|
bool case_insensitive_like = false;
|
|
|
|
ASTPtr where_expression;
|
|
ASTPtr limit_length;
|
|
|
|
String getID(char) const override { return "ShowTables"; }
|
|
ASTPtr clone() const override;
|
|
QueryKind getQueryKind() const override { return QueryKind::Show; }
|
|
|
|
protected:
|
|
void formatLike(const FormatSettings & settings) const;
|
|
void formatLimit(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const;
|
|
void formatQueryImpl(const FormatSettings & settings, FormatState &, FormatStateStacked) const override;
|
|
};
|
|
|
|
}
|