MySQL  8.0.23
Source Code Documentation
column_statistics.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
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__COLUMN_STATISTICS_INCLUDED
24 #define DD_TABLES__COLUMN_STATISTICS_INCLUDED
25 
27 #include "sql/dd/object_id.h" // Object_id
28 #include "sql/dd/string_type.h"
30 
31 namespace dd {
32 
33 class Dictionary_object;
34 class Item_name_key;
35 class Object_key;
36 class Raw_record;
37 
38 namespace tables {
39 
40 ///////////////////////////////////////////////////////////////////////////
41 
43  public:
44  static const Column_statistics &instance();
45 
46  enum enum_fields {
47  FIELD_ID = static_cast<uint>(Common_field::ID),
55  NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
56  };
57 
58  enum enum_indexes {
62  };
63 
65 
67 
69  const Raw_record &) const override;
70 
71  static bool update_object_key(Item_name_key *key, Object_id catalog_id,
72  const String_type &name);
73 
75 };
76 
77 ///////////////////////////////////////////////////////////////////////////
78 
79 } // namespace tables
80 } // namespace dd
81 
82 #endif // DD_TABLES__COLUMN_STATISTICS_INCLUDED
dd::Column_statistics
Definition: column_statistics.h:52
dd::String_type
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
dd::tables::Column_statistics::update_object_key
static bool update_object_key(Item_name_key *key, Object_id catalog_id, const String_type &name)
Definition: column_statistics.cc:94
dd::tables::Column_statistics::FIELD_CATALOG_ID
@ FIELD_CATALOG_ID
Definition: column_statistics.h:48
dd::tables::Column_statistics::FIELD_NAME
@ FIELD_NAME
Definition: column_statistics.h:49
dd::tables::Column_statistics
Definition: column_statistics.h:42
dd::tables::Column_statistics::INDEX_UK_CATALOG_ID_SCHEMA_NAME_TABLE_NAME_COLUMN_NAME
@ INDEX_UK_CATALOG_ID_SCHEMA_NAME_TABLE_NAME_COLUMN_NAME
Definition: column_statistics.h:61
dd::tables::Column_statistics::INDEX_UK_CATALOG_ID_NAME
@ INDEX_UK_CATALOG_ID_NAME
Definition: column_statistics.h:60
dd::Object_table_impl::Common_index::PK_ID
@ PK_ID
dd::tables::Column_statistics::instance
static const Column_statistics & instance()
Definition: column_statistics.cc:42
dd
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:40
dd::tables::Column_statistics::enum_foreign_keys
enum_foreign_keys
Definition: column_statistics.h:64
key
static const char * key
Definition: suite_stubs.c:14
dd::tables::Column_statistics::FIELD_HISTOGRAM
@ FIELD_HISTOGRAM
Definition: column_statistics.h:53
dd::tables::Column_statistics::enum_indexes
enum_indexes
Definition: column_statistics.h:58
object_id.h
dd::tables::Column_statistics::enum_fields
enum_fields
Definition: column_statistics.h:46
dd::tables::Column_statistics::FIELD_TABLE_NAME
@ FIELD_TABLE_NAME
Definition: column_statistics.h:51
dd::tables::Column_statistics::create_key_by_catalog_id
static Object_key * create_key_by_catalog_id(Object_id catalog_id)
dd::Raw_record
Definition: raw_record.h:53
column_statistics.h
uint
unsigned int uint
Definition: uca-dump.cc:29
dd::tables::Column_statistics::create_entity_object
dd::Column_statistics * create_entity_object(const Raw_record &) const override
Definition: column_statistics.cc:89
dd::tables::Column_statistics::FK_CATALOG_ID
@ FK_CATALOG_ID
Definition: column_statistics.h:64
string_type.h
dd::Object_table_impl::Common_index::UK_NAME
@ UK_NAME
dd::tables::Column_statistics::FIELD_OPTIONS
@ FIELD_OPTIONS
Definition: column_statistics.h:54
dd::Object_id
unsigned long long Object_id
Definition: object_id.h:30
dd::Object_table_impl::Common_field::ID
@ ID
dd::tables::Column_statistics::FIELD_COLUMN_NAME
@ FIELD_COLUMN_NAME
Definition: column_statistics.h:52
dd::Object_key
Definition: object_key.h:37
entity_object_table_impl.h
dd::Entity_object_table_impl::name
const String_type & name() const override
Get the table name used by the target definition for the dictionary table.
Definition: entity_object_table_impl.h:55
dd::tables::Column_statistics::NUMBER_OF_FIELDS
@ NUMBER_OF_FIELDS
Definition: column_statistics.h:55
dd::tables::Column_statistics::Column_statistics
Column_statistics()
Definition: column_statistics.cc:49
dd::Entity_object_table_impl
Definition: entity_object_table_impl.h:45
dd::tables::Column_statistics::FIELD_SCHEMA_NAME
@ FIELD_SCHEMA_NAME
Definition: column_statistics.h:50
final
#define final(a, b, c)
Definition: hash.c:109
dd::tables::Column_statistics::FIELD_ID
@ FIELD_ID
Definition: column_statistics.h:47
dd::tables::Column_statistics::INDEX_PK_ID
@ INDEX_PK_ID
Definition: column_statistics.h:59
dd::Item_name_key
Definition: object_keys.h:165