MySQL 8.0.39
Source Code Documentation
routines.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 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__ROUTINES_INCLUDED
25#define DD_TABLES__ROUTINES_INCLUDED
26
27#include <string>
28
30#include "sql/dd/impl/types/entity_object_table_impl.h" // dd::Dictionary_obj...
31#include "sql/dd/object_id.h"
32#include "sql/dd/string_type.h"
33#include "sql/dd/types/routine.h" // dd::Routine
34
35namespace dd {
36class Object_key;
37class Routine_name_key;
38
39namespace tables {
40
41///////////////////////////////////////////////////////////////////////////
42
44 public:
45 static const Routines &instance();
46
47 static const CHARSET_INFO *name_collation();
48
79 NUMBER_OF_FIELDS // Always keep this entry at the end of the enum
80 };
81
90 };
91
98 };
99
100 Routines();
101
102 Routine *create_entity_object(const Raw_record &) const override;
103
104 static bool update_object_key(Routine_name_key *key, Object_id schema_id,
106 const String_type &routine_name);
107
109
110 /**
111 Create a key to find all routines for a given definer.
112
113 @param definer Name of the definer.
114
115 @returns Pointer to Object_key.
116 */
117 static Object_key *create_key_by_definer(const String_type &definer);
118};
119
120///////////////////////////////////////////////////////////////////////////
121
122} // namespace tables
123} // namespace dd
124
125#endif // DD_TABLES__ROUTINES_INCLUDED
Definition: entity_object_table_impl.h:46
Definition: object_key.h:38
Definition: raw_record.h:46
Definition: object_keys.h:435
Abstract base class for functions and procedures.
Definition: routine.h:61
enum_routine_type
Definition: routine.h:88
Definition: routines.h:43
Routines()
Definition: routines.cc:52
static const CHARSET_INFO * name_collation()
Definition: routines.cc:46
static Object_key * create_key_by_schema_id(Object_id schema_id)
Definition: routines.cc:201
static const Routines & instance()
Definition: routines.cc:39
enum_indexes
Definition: routines.h:82
@ INDEX_UK_SCHEMA_ID_TYPE_NAME
Definition: routines.h:84
@ INDEX_K_SCHEMA_COLLATION_ID
Definition: routines.h:88
@ INDEX_K_RESULT_COLLATION_ID
Definition: routines.h:85
@ INDEX_K_DEFINER
Definition: routines.h:89
@ INDEX_K_CLIENT_COLLATION_ID
Definition: routines.h:86
@ INDEX_PK_ID
Definition: routines.h:83
@ INDEX_K_CONNECTION_COLLATION_ID
Definition: routines.h:87
Routine * create_entity_object(const Raw_record &) const override
Definition: routines.cc:178
static Object_key * create_key_by_definer(const String_type &definer)
Create a key to find all routines for a given definer.
Definition: routines.cc:208
enum_fields
Definition: routines.h:49
@ FIELD_SCHEMA_COLLATION_ID
Definition: routines.h:73
@ FIELD_SQL_DATA_ACCESS
Definition: routines.h:67
@ FIELD_PARAMETER_STR
Definition: routines.h:65
@ FIELD_CREATED
Definition: routines.h:74
@ FIELD_RESULT_IS_ZEROFILL
Definition: routines.h:56
@ FIELD_RESULT_DATA_TYPE
Definition: routines.h:54
@ FIELD_DEFINITION_UTF8
Definition: routines.h:64
@ FIELD_LAST_ALTERED
Definition: routines.h:75
@ FIELD_ID
Definition: routines.h:50
@ FIELD_RESULT_NUMERIC_PRECISION
Definition: routines.h:59
@ FIELD_SECURITY_TYPE
Definition: routines.h:68
@ FIELD_RESULT_NUMERIC_SCALE
Definition: routines.h:60
@ FIELD_RESULT_CHAR_LENGTH
Definition: routines.h:58
@ FIELD_SCHEMA_ID
Definition: routines.h:51
@ FIELD_CLIENT_COLLATION_ID
Definition: routines.h:71
@ FIELD_RESULT_IS_UNSIGNED
Definition: routines.h:57
@ NUMBER_OF_FIELDS
Definition: routines.h:79
@ FIELD_EXTERNAL_LANGUAGE
Definition: routines.h:78
@ FIELD_DEFINER
Definition: routines.h:69
@ FIELD_CONNECTION_COLLATION_ID
Definition: routines.h:72
@ FIELD_COMMENT
Definition: routines.h:76
@ FIELD_RESULT_DATETIME_PRECISION
Definition: routines.h:61
@ FIELD_SQL_MODE
Definition: routines.h:70
@ FIELD_RESULT_COLLATION_ID
Definition: routines.h:62
@ FIELD_RESULT_DATA_TYPE_UTF8
Definition: routines.h:55
@ FIELD_OPTIONS
Definition: routines.h:77
@ FIELD_DEFINITION
Definition: routines.h:63
@ FIELD_IS_DETERMINISTIC
Definition: routines.h:66
@ FIELD_NAME
Definition: routines.h:52
@ FIELD_TYPE
Definition: routines.h:53
enum_foreign_keys
Definition: routines.h:92
@ FK_RESULT_COLLATION_ID
Definition: routines.h:94
@ FK_CONNECTION_COLLATION_ID
Definition: routines.h:96
@ FK_CLIENT_COLLATION_ID
Definition: routines.h:95
@ FK_SCHEMA_ID
Definition: routines.h:93
@ FK_SCHEMA_COLLATION_ID
Definition: routines.h:97
static bool update_object_key(Routine_name_key *key, Object_id schema_id, Routine::enum_routine_type type, const String_type &routine_name)
Definition: routines.cc:190
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
unsigned long long Object_id
Definition: object_id.h:31
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
required string key
Definition: replication_asynchronous_connection_failover.proto:60
required string type
Definition: replication_group_member_actions.proto:34
Definition: m_ctype.h:385
unsigned int uint
Definition: uca9-dump.cc:75