blob: 2fd4c3dac961718ae766ce87d23bfbd153a38f9d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#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;
IAST * from;
String cluster_str;
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; }
String getFrom() const;
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;
};
}
|