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