MySQL 8.0.31
Source Code Documentation
schemata.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_TABLES__SCHEMATA_INCLUDED
24#define DD_TABLES__SCHEMATA_INCLUDED
25
26#include <string>
27
29#include "sql/dd/object_id.h"
30#include "sql/dd/string_type.h"
31#include "sql/dd/types/schema.h"
32
33namespace dd {
34
35class Item_name_key;
36class Object_key;
37class Raw_record;
38
39namespace tables {
40
41///////////////////////////////////////////////////////////////////////////
42
44 public:
45 static const Schemata &instance();
46
47 static const CHARSET_INFO *name_collation();
48
59 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
60 };
61
66 };
67
69
70 Schemata();
71
72 Schema *create_entity_object(const Raw_record &) const override;
73
74 static bool update_object_key(Item_name_key *key, Object_id catalog_id,
75 const String_type &schema_name);
76
78};
79
80///////////////////////////////////////////////////////////////////////////
81
82} // namespace tables
83} // namespace dd
84
85#endif // DD_TABLES__SCHEMATA_INCLUDED
Definition: entity_object_table_impl.h:45
Definition: object_keys.h:165
Definition: object_key.h:37
Definition: raw_record.h:45
Definition: schema.h:62
Definition: schemata.h:43
Schemata()
Definition: schemata.cc:54
enum_fields
Definition: schemata.h:49
@ FIELD_SE_PRIVATE_DATA
Definition: schemata.h:58
@ FIELD_DEFAULT_ENCRYPTION
Definition: schemata.h:57
@ FIELD_ID
Definition: schemata.h:50
@ FIELD_LAST_ALTERED
Definition: schemata.h:55
@ FIELD_OPTIONS
Definition: schemata.h:56
@ FIELD_DEFAULT_COLLATION_ID
Definition: schemata.h:53
@ FIELD_CATALOG_ID
Definition: schemata.h:51
@ FIELD_NAME
Definition: schemata.h:52
@ NUMBER_OF_FIELDS
Definition: schemata.h:59
@ FIELD_CREATED
Definition: schemata.h:54
static const CHARSET_INFO * name_collation()
Definition: schemata.cc:48
static const Schemata & instance()
Definition: schemata.cc:41
static bool update_object_key(Item_name_key *key, Object_id catalog_id, const String_type &schema_name)
Definition: schemata.cc:101
enum_foreign_keys
Definition: schemata.h:68
@ FK_CATALOG_ID
Definition: schemata.h:68
@ FK_DEFAULT_COLLATION_ID
Definition: schemata.h:68
static Object_key * create_key_by_catalog_id(Object_id catalog_id)
Definition: schemata.cc:117
enum_indexes
Definition: schemata.h:62
@ INDEX_K_DEFAULT_COLLATION_ID
Definition: schemata.h:65
@ INDEX_PK_ID
Definition: schemata.h:63
@ INDEX_UK_CATALOG_ID_NAME
Definition: schemata.h:64
Schema * create_entity_object(const Raw_record &) const override
Definition: schemata.cc:110
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
required string key
Definition: replication_asynchronous_connection_failover.proto:59
Definition: m_ctype.h:382
unsigned int uint
Definition: uca-dump.cc:29