-
Notifications
You must be signed in to change notification settings - Fork 6.6k
/
ASTSelectQuery.h
57 lines (46 loc) · 1.48 KB
/
ASTSelectQuery.h
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
51
52
53
54
55
56
57
#pragma once
#include <Parsers/IAST.h>
#include <Core/Names.h>
namespace DB
{
struct ASTTablesInSelectQueryElement;
/** SELECT query
*/
class ASTSelectQuery : public IAST
{
public:
/** Get the text that identifies this element. */
String getID() const override { return "SelectQuery"; }
ASTPtr clone() const override;
bool distinct = false;
ASTPtr with_expression_list;
ASTPtr select_expression_list;
ASTPtr tables;
ASTPtr prewhere_expression;
ASTPtr where_expression;
ASTPtr group_expression_list;
bool group_by_with_totals = false;
bool group_by_with_rollup = false;
ASTPtr having_expression;
ASTPtr order_expression_list;
ASTPtr limit_by_value;
ASTPtr limit_by_expression_list;
ASTPtr limit_offset;
ASTPtr limit_length;
ASTPtr settings;
/// Compatibility with old parser of tables list. TODO remove
ASTPtr database() const;
ASTPtr table() const;
ASTPtr sample_size() const;
ASTPtr sample_offset() const;
ASTPtr array_join_expression_list() const;
const ASTTablesInSelectQueryElement * join() const;
bool array_join_is_left() const;
bool final() const;
void setDatabaseIfNeeded(const String & database_name);
void replaceDatabaseAndTable(const String & database_name, const String & table_name);
void addTableFunction(ASTPtr & table_function_ptr);
protected:
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
};
}