MySQL 8.0.39
Source Code Documentation
parse_tree_window.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef SQL_PARSE_TREE_WINDOW_INCLUDED
25#define SQL_PARSE_TREE_WINDOW_INCLUDED
26
28#include "sql/sql_list.h"
29#include "sql/window.h"
30
31class Item_string;
32class PT_frame;
33class PT_order_list;
34
35/**
36 Parse tree node for a window; just a shallow wrapper for
37 class Window, q.v.
38*/
39class PT_window : public Parse_tree_node, public Window {
41
42 public:
43 PT_window(PT_order_list *partition_by, PT_order_list *order_by,
45 : Window(partition_by, order_by, frame) {}
46
47 PT_window(PT_order_list *partition_by, PT_order_list *order_by,
48 PT_frame *frame, Item_string *inherit)
49 : Window(partition_by, order_by, frame, inherit) {}
50
52
53 bool contextualize(Parse_context *pc) override;
54};
55
56/**
57 Parse tree node for a list of window definitions corresponding
58 to a <window clause> in SQL 2003.
59*/
63
64 public:
65 PT_window_list() = default;
66
67 bool contextualize(Parse_context *pc) override;
68
69 bool push_back(PT_window *w) { return m_windows.push_back(w); }
70};
71
72#endif // SQL_PARSE_TREE_WINDOW_INCLUDED
Definition: item.h:5255
Definition: sql_list.h:434
Parse tree node for a window's frame, cf.
Definition: parse_tree_nodes.h:1322
Definition: parse_tree_nodes.h:214
Parse tree node for a list of window definitions corresponding to a <window clause> in SQL 2003.
Definition: parse_tree_window.h:60
PT_window_list()=default
bool push_back(PT_window *w)
Definition: parse_tree_window.h:69
Parse_tree_node super
Definition: parse_tree_window.h:61
List< Window > m_windows
Definition: parse_tree_window.h:62
bool contextualize(Parse_context *pc) override
Definition: parse_tree_window.cc:59
Parse tree node for a window; just a shallow wrapper for class Window, q.v.
Definition: parse_tree_window.h:39
PT_window(Item_string *name)
Definition: parse_tree_window.h:51
PT_window(PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame)
Definition: parse_tree_window.h:43
Parse_tree_node super
Definition: parse_tree_window.h:40
PT_window(PT_order_list *partition_by, PT_order_list *order_by, PT_frame *frame, Item_string *inherit)
Definition: parse_tree_window.h:47
bool contextualize(Parse_context *pc) override
Definition: parse_tree_window.cc:35
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:139
Represents the (explicit) window of a SQL 2003 section 7.11 <window clause>, or the implicit (inlined...
Definition: window.h:105
const PT_frame * frame() const
Get the frame, if any.
Definition: window.h:773
Item_string * name() const
Get the name of a window.
Definition: window.h:765
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:121