MySQL  8.0.19
Source Code Documentation
collations.h
Go to the documentation of this file.
1 /* Copyright (c) 2014, 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__COLLATIONS_INCLUDED
24 #define DD_TABLES__COLLATIONS_INCLUDED
25 
26 #include <string>
27 
29 #include "sql/dd/string_type.h"
30 #include "sql/dd/types/collation.h"
31 
32 class THD;
33 
34 namespace dd {
35 class Global_name_key;
36 class Raw_record;
37 
38 namespace tables {
39 
40 ///////////////////////////////////////////////////////////////////////////
41 
43  public:
44  static const Collations &instance();
45 
46  static const CHARSET_INFO *name_collation();
47 
48  enum enum_fields {
49  FIELD_ID = static_cast<uint>(Common_field::ID),
56  NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
57  };
58 
59  enum enum_indexes {
63  };
64 
66 
67  Collations();
68 
69  virtual bool populate(THD *thd) const;
70 
71  virtual Collation *create_entity_object(const Raw_record &) const;
72 
74  const String_type &collation_name);
75 };
76 
77 ///////////////////////////////////////////////////////////////////////////
78 
79 } // namespace tables
80 } // namespace dd
81 
82 #endif // DD_TABLES__COLLATIONS_INCLUDED
THD
Definition: sql_class.h:764
dd::String_type
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
dd::tables::Collations::NUMBER_OF_FIELDS
@ NUMBER_OF_FIELDS
Definition: collations.h:56
CHARSET_INFO
Definition: m_ctype.h:354
dd::tables::Collations
Definition: collations.h:42
dd::tables::Collations::update_object_key
static bool update_object_key(Global_name_key *key, const String_type &collation_name)
Definition: collations.cc:183
dd::Object_table_impl::Common_index::PK_ID
@ PK_ID
collation.h
dd::tables::Collations::FIELD_ID
@ FIELD_ID
Definition: collations.h:49
dd
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:39
dd::tables::Collations::FIELD_PAD_ATTRIBUTE
@ FIELD_PAD_ATTRIBUTE
Definition: collations.h:54
dd::tables::Collations::instance
static const Collations & instance()
Definition: collations.cc:49
key
static const char * key
Definition: suite_stubs.c:14
dd::tables::Collations::INDEX_PK_ID
@ INDEX_PK_ID
Definition: collations.h:60
dd::Raw_record
Definition: raw_record.h:53
uint
unsigned int uint
Definition: uca-dump.cc:29
dd::tables::Collations::FIELD_CHARACTER_SET_ID
@ FIELD_CHARACTER_SET_ID
Definition: collations.h:51
string_type.h
dd::Object_table_impl::Common_index::UK_NAME
@ UK_NAME
dd::tables::Collations::enum_fields
enum_fields
Definition: collations.h:48
dd::tables::Collations::FIELD_OPTIONS
@ FIELD_OPTIONS
Definition: collations.h:55
dd::tables::Collations::create_entity_object
virtual Collation * create_entity_object(const Raw_record &) const
Definition: collations.cc:177
dd::tables::Collations::INDEX_UK_NAME
@ INDEX_UK_NAME
Definition: collations.h:61
dd::Object_table_impl::Common_field::ID
@ ID
dd::tables::Collations::enum_indexes
enum_indexes
Definition: collations.h:59
dd::tables::Collations::name_collation
static const CHARSET_INFO * name_collation()
Definition: collations.cc:56
dd::tables::Collations::FIELD_IS_COMPILED
@ FIELD_IS_COMPILED
Definition: collations.h:52
dd::tables::Collations::INDEX_K_CHARACTER_SET_ID
@ INDEX_K_CHARACTER_SET_ID
Definition: collations.h:62
dd::tables::Collations::populate
virtual bool populate(THD *thd) const
Execute low level code for populating the table.
Definition: collations.cc:95
entity_object_table_impl.h
dd::tables::Collations::FK_CHARACTER_SET_ID
@ FK_CHARACTER_SET_ID
Definition: collations.h:65
dd::tables::Collations::FIELD_NAME
@ FIELD_NAME
Definition: collations.h:50
dd::Entity_object_table_impl
Definition: entity_object_table_impl.h:44
dd::tables::Collations::Collations
Collations()
Definition: collations.cc:62
dd::Global_name_key
Definition: object_keys.h:122
dd::tables::Collations::enum_foreign_keys
enum_foreign_keys
Definition: collations.h:65
dd::tables::Collations::FIELD_SORT_LENGTH
@ FIELD_SORT_LENGTH
Definition: collations.h:53
dd::Collation
Definition: collation.h:45