MySQL 8.0.32
Source Code Documentation
parse_tree_window.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef SQL_PARSE_TREE_WINDOW_INCLUDED
24#define SQL_PARSE_TREE_WINDOW_INCLUDED
25
27#include "sql/sql_list.h"
28#include "sql/window.h"
29
30class Item_string;
31class PT_frame;
32class PT_order_list;
33
34/**
35 Parse tree node for a window; just a shallow wrapper for
36 class Window, q.v.
37*/
38class PT_window : public Parse_tree_node, public Window {
40
41 public:
42 PT_window(PT_order_list *partition_by, PT_order_list *order_by,
44 : Window(partition_by, order_by, frame) {}
45
46 PT_window(PT_order_list *partition_by, PT_order_list *order_by,
47 PT_frame *frame, Item_string *inherit)
48 : Window(partition_by, order_by, frame, inherit) {}
49
51
52 bool contextualize(Parse_context *pc) override;
53};
54
55/**
56 Parse tree node for a list of window definitions corresponding
57 to a <window clause> in SQL 2003.
58*/
62
63 public:
64 PT_window_list() = default;
65
66 bool contextualize(Parse_context *pc) override;
67
68 bool push_back(PT_window *w) { return m_windows.push_back(w); }
69};
70
71#endif // SQL_PARSE_TREE_WINDOW_INCLUDED
Definition: item.h:5195
Definition: sql_list.h:433
Parse tree node for a window's frame, cf.
Definition: parse_tree_nodes.h:1321
Definition: parse_tree_nodes.h:213
Parse tree node for a list of window definitions corresponding to a <window clause> in SQL 2003.
Definition: parse_tree_window.h:59
PT_window_list()=default
bool push_back(PT_window *w)
Definition: parse_tree_window.h:68
Parse_tree_node super
Definition: parse_tree_window.h:60
List< Window > m_windows
Definition: parse_tree_window.h:61
bool contextualize(Parse_context *pc) override
Definition: parse_tree_window.cc:58
Parse tree node for a window; just a shallow wrapper for class Window, q.v.
Definition: parse_tree_window.h:38
PT_window(Item_string *name)
Definition: parse_tree_window.h:50
PT_window(PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame)
Definition: parse_tree_window.h:42
Parse_tree_node super
Definition: parse_tree_window.h:39
PT_window(PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame, Item_string *inherit)
Definition: parse_tree_window.h:46
bool contextualize(Parse_context *pc) override
Definition: parse_tree_window.cc:34
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:138
Represents the (explicit) window of a SQL 2003 section 7.11 <window clause>, or the implicit (inlined...
Definition: window.h:104
const PT_frame * frame() const
Get the frame, if any.
Definition: window.h:767
Item_string * name() const
Get the name of a window.
Definition: window.h:759
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:120