MySQL 8.0.39
Source Code Documentation
view_routine_impl.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 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 DD__VIEW_ROUTINE_IMPL_INCLUDED
25#define DD__VIEW_ROUTINE_IMPL_INCLUDED
26
27#include <sys/types.h>
28#include <new>
29
31#include "sql/dd/impl/types/weak_object_impl.h" // dd::Weak_object_impl
32#include "sql/dd/string_type.h"
33#include "sql/dd/types/view_routine.h" // dd::View_routine
34
35namespace dd {
36
37///////////////////////////////////////////////////////////////////////////
38
39class Object_key;
40class Object_table;
41class Open_dictionary_tables_ctx;
42class View;
43class View_impl;
44class Weak_object;
45
46///////////////////////////////////////////////////////////////////////////
47
49 public:
51
53
55
56 ~View_routine_impl() override = default;
57
58 public:
60
61 const Object_table &object_table() const override;
62
63 bool validate() const override;
64
65 bool store_attributes(Raw_record *r) override;
66
67 bool restore_attributes(const Raw_record &r) override;
68
69 void debug_print(String_type &outb) const override;
70
72
73 virtual uint ordinal_position() const { return -1; }
74
75 public:
76 /////////////////////////////////////////////////////////////////////////
77 // routine catalog.
78 /////////////////////////////////////////////////////////////////////////
79
80 const String_type &routine_catalog() const override {
81 return m_routine_catalog;
82 }
83
84 void set_routine_catalog(const String_type &sf_catalog) override {
85 m_routine_catalog = sf_catalog;
86 }
87
88 /////////////////////////////////////////////////////////////////////////
89 // routine schema.
90 /////////////////////////////////////////////////////////////////////////
91
92 const String_type &routine_schema() const override {
93 return m_routine_schema;
94 }
95
96 void set_routine_schema(const String_type &sf_schema) override {
97 m_routine_schema = sf_schema;
98 }
99
100 /////////////////////////////////////////////////////////////////////////
101 // routine name.
102 /////////////////////////////////////////////////////////////////////////
103
104 const String_type &routine_name() const override { return m_routine_name; }
105
106 void set_routine_name(const String_type &sf_name) override {
107 m_routine_name = sf_name;
108 }
109
110 /////////////////////////////////////////////////////////////////////////
111 // view.
112 /////////////////////////////////////////////////////////////////////////
113
114 const View &view() const override;
115
116 View &view() override;
117
118 public:
120 return new (std::nothrow) View_routine_impl(view);
121 }
122
124 View_impl *view) {
125 return new (std::nothrow) View_routine_impl(other, view);
126 }
127
128 public:
129 Object_key *create_primary_key() const override;
130 bool has_new_primary_key() const override;
131
132 private:
136
137 // References to other objects
139};
140
141///////////////////////////////////////////////////////////////////////////
142
143} // namespace dd
144
145#endif // DD__VIEW_ROUTINE_IMPL_INCLUDED
Definition: object_key.h:38
This class represents all data dictionary table like mysql.tables, mysql.columns and more.
Definition: object_table.h:72
Auxiliary class for opening dictionary tables.
Definition: transaction_impl.h:76
Definition: raw_record.h:46
Definition: view_impl.h:57
Definition: view_routine_impl.h:48
void set_routine_catalog(const String_type &sf_catalog) override
Definition: view_routine_impl.h:84
static View_routine_impl * clone(const View_routine_impl &other, View_impl *view)
Definition: view_routine_impl.h:123
bool validate() const override
Definition: view_routine_impl.cc:63
const Object_table & object_table() const override
Definition: view_routine_impl.cc:134
bool store_attributes(Raw_record *r) override
Definition: view_routine_impl.cc:90
bool restore_attributes(const Raw_record &r) override
Definition: view_routine_impl.cc:76
static void register_tables(Open_dictionary_tables_ctx *otx)
Definition: view_routine_impl.cc:140
bool has_new_primary_key() const override
Indicates that object is guaranteed to have primary key value which doesn't exist in database (e....
Definition: view_routine_impl.cc:118
virtual uint ordinal_position() const
Definition: view_routine_impl.h:73
const String_type & routine_schema() const override
Definition: view_routine_impl.h:92
const View & view() const override
Definition: view_routine_impl.cc:57
Object_key * create_primary_key() const override
Definition: view_routine_impl.cc:113
~View_routine_impl() override=default
void debug_print(String_type &outb) const override
Definition: view_routine_impl.cc:100
void set_routine_schema(const String_type &sf_schema) override
Definition: view_routine_impl.h:96
const String_type & routine_catalog() const override
Definition: view_routine_impl.h:80
void set_routine_name(const String_type &sf_name) override
Definition: view_routine_impl.h:106
View_impl * m_view
Definition: view_routine_impl.h:138
void set_ordinal_position(uint)
Definition: view_routine_impl.h:71
String_type m_routine_schema
Definition: view_routine_impl.h:134
String_type m_routine_name
Definition: view_routine_impl.h:135
String_type m_routine_catalog
Definition: view_routine_impl.h:133
const String_type & routine_name() const override
Definition: view_routine_impl.h:104
static View_routine_impl * restore_item(View_impl *view)
Definition: view_routine_impl.h:119
Definition: view_routine.h:42
Definition: view.h:39
Definition: weak_object_impl.h:48
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:86
unsigned int uint
Definition: uca9-dump.cc:75