MySQL 8.4.2
Source Code Documentation
table_stats.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_TABLES__TABLE_STATS_INCLUDED
25#define DD_TABLES__TABLE_STATS_INCLUDED
26
27#include <new>
28#include <string>
29
30#include "sql/dd/impl/raw/object_keys.h" // Composite_char_key
32// Entity_object_table_impl
33#include "sql/dd/impl/types/table_stat_impl.h" // Table_stat
34#include "sql/dd/string_type.h"
36
37namespace dd {
38
39class Raw_record;
40
41namespace tables {
42
43///////////////////////////////////////////////////////////////////////////
44
45class Table_stats : virtual public Entity_object_table_impl {
46 public:
48
49 static const Table_stats &instance();
50
65 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
66 };
67
69
71
72 Table_stat *create_entity_object(const Raw_record &) const override {
73 return new (std::nothrow) Table_stat_impl();
74 }
75
76 static Table_stat::Name_key *create_object_key(const String_type &schema_name,
77 const String_type &table_name);
78};
79
80} // namespace tables
81} // namespace dd
82
83#endif // DD_TABLES__TABLE_STATS_INCLUDED
Definition: object_keys.h:295
Definition: entity_object_table_impl.h:46
Definition: raw_record.h:46
Definition: table_stat_impl.h:54
Definition: table_stat.h:43
Definition: table_stats.h:45
enum_indexes
Definition: table_stats.h:68
@ INDEX_PK_SCHEMA_ID_TABLE_NAME
Definition: table_stats.h:68
Table_stats()
Definition: table_stats.cc:35
enum_fields
Definition: table_stats.h:51
@ FIELD_AUTO_INCREMENT
Definition: table_stats.h:60
@ FIELD_TABLE_ROWS
Definition: table_stats.h:54
@ FIELD_DATA_LENGTH
Definition: table_stats.h:56
@ FIELD_CACHED_TIME
Definition: table_stats.h:64
@ FIELD_AVG_ROW_LENGTH
Definition: table_stats.h:55
@ FIELD_DATA_FREE
Definition: table_stats.h:59
@ FIELD_CHECKSUM
Definition: table_stats.h:61
@ FIELD_INDEX_LENGTH
Definition: table_stats.h:58
@ FIELD_TABLE_NAME
Definition: table_stats.h:53
@ FIELD_MAX_DATA_LENGTH
Definition: table_stats.h:57
@ FIELD_UPDATE_TIME
Definition: table_stats.h:62
@ FIELD_CHECK_TIME
Definition: table_stats.h:63
@ FIELD_SCHEMA_NAME
Definition: table_stats.h:52
@ NUMBER_OF_FIELDS
Definition: table_stats.h:65
Table_stat * create_entity_object(const Raw_record &) const override
Definition: table_stats.h:72
static const Table_stats & instance()
Definition: table_stats.cc:72
static Table_stat::Name_key * create_object_key(const String_type &schema_name, const String_type &table_name)
Definition: table_stats.cc:79
enum_foreign_keys
Definition: table_stats.h:70
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 char * table_name
Definition: rules_table_service.cc:56