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