MySQL 9.1.0
Source Code Documentation
parameter_type_element_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__PARAMETER_TYPE_ELEMENT_IMPL_INCLUDED
25#define DD__PARAMETER_TYPE_ELEMENT_IMPL_INCLUDED
26
27#include <sys/types.h>
28#include <new>
29
30#include "sql/dd/impl/types/weak_object_impl.h" // dd::Weak_object_impl
31#include "sql/dd/string_type.h"
32#include "sql/dd/types/parameter_type_element.h" // dd::Parameter_type_element
33
34namespace dd {
35
36///////////////////////////////////////////////////////////////////////////
37
38class Object_key;
39class Object_table;
40class Open_dictionary_tables_ctx;
41class Parameter;
42class Parameter_impl;
43class Raw_record;
44class Weak_object;
45
46///////////////////////////////////////////////////////////////////////////
47
50 public:
52
55
57 Parameter_impl *parent);
58
59 ~Parameter_type_element_impl() override = default;
60
61 public:
63
64 const Object_table &object_table() const override;
65
66 bool validate() const override;
67
68 bool store_attributes(Raw_record *r) override;
69
70 bool restore_attributes(const Raw_record &r) override;
71
74 }
75
76 virtual uint ordinal_position() const { return index(); }
77
78 public:
80 return new (std::nothrow) Parameter_type_element_impl(parameter);
81 }
82
85 return new (std::nothrow) Parameter_type_element_impl(other, parameter);
86 }
87
88 public:
89 /////////////////////////////////////////////////////////////////////////
90 // Name.
91 /////////////////////////////////////////////////////////////////////////
92
93 const String_type &name() const override { return m_name; }
94
95 void set_name(const String_type &name) override { m_name = name; }
96
97 /////////////////////////////////////////////////////////////////////////
98 // Parameter
99 /////////////////////////////////////////////////////////////////////////
100
101 const Parameter &parameter() const override;
102
103 /////////////////////////////////////////////////////////////////////////
104 // index.
105 /////////////////////////////////////////////////////////////////////////
106
107 uint index() const override { return m_index; }
108
109 public:
110 void debug_print(String_type &outb) const override;
111
112 protected:
113 Object_key *create_primary_key() const override;
114 bool has_new_primary_key() const override;
115
116 protected:
117 // Fields
120
121 // References to other objects
123};
124
125///////////////////////////////////////////////////////////////////////////
126
127} // namespace dd
128
129#endif // DD__PARAMETER_TYPE_ELEMENT_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: parameter_impl.h:55
Definition: parameter_type_element_impl.h:49
~Parameter_type_element_impl() override=default
const Object_table & object_table() const override
Definition: parameter_type_element_impl.cc:145
uint index() const override
Definition: parameter_type_element_impl.h:107
Parameter_impl * m_parameter
Definition: parameter_type_element_impl.h:122
void debug_print(String_type &outb) const override
Definition: parameter_type_element_impl.cc:110
void set_name(const String_type &name) override
Definition: parameter_type_element_impl.h:95
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: parameter_type_element_impl.cc:130
const Parameter & parameter() const override
Definition: parameter_type_element_impl.cc:58
bool store_attributes(Raw_record *r) override
Definition: parameter_type_element_impl.cc:100
Object_key * create_primary_key() const override
Definition: parameter_type_element_impl.cc:124
uint m_index
Definition: parameter_type_element_impl.h:119
const String_type & name() const override
Definition: parameter_type_element_impl.h:93
String_type m_name
Definition: parameter_type_element_impl.h:118
virtual uint ordinal_position() const
Definition: parameter_type_element_impl.h:76
Parameter_type_element_impl(Parameter_impl *parameter)
Definition: parameter_type_element_impl.h:53
void set_ordinal_position(uint ordinal_position)
Definition: parameter_type_element_impl.h:72
static Parameter_type_element_impl * clone(const Parameter_type_element_impl &other, Parameter_impl *parameter)
Definition: parameter_type_element_impl.h:83
static Parameter_type_element_impl * restore_item(Parameter_impl *parameter)
Definition: parameter_type_element_impl.h:79
static void register_tables(Open_dictionary_tables_ctx *otx)
Definition: parameter_type_element_impl.cc:151
bool validate() const override
Definition: parameter_type_element_impl.cc:64
bool restore_attributes(const Raw_record &r) override
Definition: parameter_type_element_impl.cc:86
Parameter_type_element_impl()
Definition: parameter_type_element_impl.h:51
Definition: parameter_type_element.h:43
Definition: parameter.h:45
Definition: raw_record.h:46
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