ClickHouse/src/Parsers/ASTShowTablesQuery.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
C++
Raw Normal View History

2012-06-18 07:49:19 +00:00
#pragma once
2017-04-16 05:40:17 +00:00
#include <iomanip>
#include <Parsers/IAST.h>
#include <Parsers/ASTQueryWithOutput.h>
2012-06-18 07:49:19 +00:00
namespace DB
{
2022-06-23 15:46:27 +00:00
/** Query SHOW TABLES or SHOW DATABASES or SHOW CLUSTERS or SHOW CACHES
2012-06-18 07:49:19 +00:00
*/
class ASTShowTablesQuery : public ASTQueryWithOutput
2012-06-18 07:49:19 +00:00
{
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;
2020-06-05 09:13:13 +00:00
String cluster_str;
2012-06-18 07:49:19 +00:00
String from;
String like;
bool not_like = false;
bool case_insensitive_like = false;
2020-02-11 11:35:30 +00:00
ASTPtr where_expression;
2019-09-15 16:07:27 +00:00
ASTPtr limit_length;
2012-06-18 07:49:19 +00:00
String getID(char) const override { return "ShowTables"; }
ASTPtr clone() const override;
2023-02-02 01:11:16 +00:00
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;
2012-06-18 07:49:19 +00:00
};
}