MySQL 8.4.2
Source Code Documentation
index_stat_impl.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 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__INDEX_STAT_IMPL_INCLUDED
25#define DD__INDEX_STAT_IMPL_INCLUDED
26
27#include <memory>
28#include <new>
29#include <string>
30
31#include "my_inttypes.h"
33#include "sql/dd/impl/types/entity_object_impl.h" // dd::Entity_object_impl
34#include "sql/dd/object_id.h"
35#include "sql/dd/string_type.h"
37#include "sql/dd/types/index_stat.h" // dd::Index_stat
38
39namespace dd {
40
41///////////////////////////////////////////////////////////////////////////
42
43class Charset;
44class Object_key;
45class Open_dictionary_tables_ctx;
46class Raw_table;
47class Weak_object;
48class Object_table;
49
50///////////////////////////////////////////////////////////////////////////
51
53 public:
55
56 public:
57 void debug_print(String_type &outb) const override;
58
59 const Object_table &object_table() const override;
60
61 bool validate() const override;
62
63 bool restore_attributes(const Raw_record &r) override;
64 bool store_attributes(Raw_record *r) override;
65
66 public:
68
69 /////////////////////////////////////////////////////////////////////////
70 // schema name.
71 /////////////////////////////////////////////////////////////////////////
72
73 const String_type &schema_name() const override { return m_schema_name; }
74
75 void set_schema_name(const String_type &schema_name) override {
77 }
78
79 /////////////////////////////////////////////////////////////////////////
80 // table name.
81 /////////////////////////////////////////////////////////////////////////
82
83 const String_type &table_name() const override { return m_table_name; }
84
85 void set_table_name(const String_type &table_name) override {
87 }
88
89 /////////////////////////////////////////////////////////////////////////
90 // index name.
91 /////////////////////////////////////////////////////////////////////////
92
93 const String_type &index_name() const override { return m_index_name; }
94
95 void set_index_name(const String_type &index_name) override {
97 }
98
99 /////////////////////////////////////////////////////////////////////////
100 // column name.
101 /////////////////////////////////////////////////////////////////////////
102
103 const String_type &column_name() const override { return m_column_name; }
104
107 }
108
109 /////////////////////////////////////////////////////////////////////////
110 // cardinality.
111 /////////////////////////////////////////////////////////////////////////
112
113 ulonglong cardinality() const override { return m_cardinality; }
114
117 }
118
119 /////////////////////////////////////////////////////////////////////////
120 // cached_time.
121 /////////////////////////////////////////////////////////////////////////
122
123 ulonglong cached_time() const override { return m_cached_time; }
124
127 }
128
129 public:
130 Object_key *create_primary_key() const override;
131 bool has_new_primary_key() const override;
132
133 // Fix "inherits ... via dominance" warnings
135 const Entity_object_impl *impl() const override {
137 }
138 Object_id id() const override { return Entity_object_impl::id(); }
139 bool is_persistent() const override {
141 }
142 const String_type &name() const override {
144 }
145 void set_name(const String_type &name) override {
147 }
148
149 private:
150 // Fields
155
158};
159
160///////////////////////////////////////////////////////////////////////////
161
162} // namespace dd
163
164#endif // DD__INDEX_STAT_IMPL_INCLUDED
Definition: entity_object_impl.h:44
void set_name(const String_type &name) override
Definition: entity_object_impl.h:62
Object_id id() const override
The unique dictionary object id.
Definition: entity_object_impl.h:49
const String_type & name() const override
Definition: entity_object_impl.h:60
Entity_object_impl * impl() override
Definition: entity_object_impl.h:68
bool is_persistent() const override
Is dictionary object persistent in dictionary tables ?
Definition: entity_object_impl.h:57
Definition: index_stat_impl.h:52
void set_cardinality(ulonglong cardinality) override
Definition: index_stat_impl.h:115
bool restore_attributes(const Raw_record &r) override
Definition: index_stat_impl.cc:87
void set_column_name(const String_type &column_name) override
Definition: index_stat_impl.h:105
void set_name(const String_type &name) override
Definition: index_stat_impl.h:145
ulonglong cardinality() const override
Definition: index_stat_impl.h:113
void debug_print(String_type &outb) const override
Definition: index_stat_impl.cc:112
bool validate() const override
Definition: index_stat_impl.cc:74
Index_stat_impl()
Definition: index_stat_impl.h:54
Entity_object_impl * impl() override
Definition: index_stat_impl.h:134
void set_table_name(const String_type &table_name) override
Definition: index_stat_impl.h:85
bool is_persistent() const override
Is dictionary object persistent in dictionary tables ?
Definition: index_stat_impl.h:139
static void register_tables(Open_dictionary_tables_ctx *otx)
Definition: index_stat_impl.cc:141
void set_index_name(const String_type &index_name) override
Definition: index_stat_impl.h:95
ulonglong m_cached_time
Definition: index_stat_impl.h:157
const String_type & table_name() const override
Definition: index_stat_impl.h:83
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: index_stat_impl.cc:48
void set_cached_time(ulonglong cached_time) override
Definition: index_stat_impl.h:125
String_type m_table_name
Definition: index_stat_impl.h:152
const String_type & column_name() const override
Definition: index_stat_impl.h:103
Object_key * create_primary_key() const override
Definition: index_stat_impl.cc:128
ulonglong cached_time() const override
Definition: index_stat_impl.h:123
String_type m_schema_name
Definition: index_stat_impl.h:151
Object_id id() const override
The unique dictionary object id.
Definition: index_stat_impl.h:138
const String_type & index_name() const override
Definition: index_stat_impl.h:93
const String_type & name() const override
Definition: index_stat_impl.h:142
String_type m_index_name
Definition: index_stat_impl.h:153
ulonglong m_cardinality
Definition: index_stat_impl.h:156
bool store_attributes(Raw_record *r) override
Definition: index_stat_impl.cc:100
const Entity_object_impl * impl() const override
Definition: index_stat_impl.h:135
String_type m_column_name
Definition: index_stat_impl.h:154
const String_type & schema_name() const override
Definition: index_stat_impl.h:73
void set_schema_name(const String_type &schema_name) override
Definition: index_stat_impl.h:75
const Object_table & object_table() const override
Definition: index_stat_impl.cc:135
Definition: index_stat.h:43
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
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
unsigned long long Object_id
Definition: object_id.h:31
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