MySQL 9.2.0
Source Code Documentation
library.h
Go to the documentation of this file.
1/* Copyright (c) 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__LIBRARY_INCLUDED
25#define DD__LIBRARY_INCLUDED
26
27#include "sql/dd/types/routine.h" // Routine
28
29struct MDL_key;
30
31namespace dd {
32
33class Library_impl;
34
35///////////////////////////////////////////////////////////////////////////
36
37class Library : virtual public Routine {
38 public:
40
41 bool update_name_key(Name_key *key) const override {
43 }
44
46 const String_type &name);
47
48 public:
49 ~Library() override = default;
50
51 /**
52 Allocate a new object graph and invoke the copy constructor for
53 each object. Only used in unit testing.
54
55 @return pointer to dynamically allocated copy
56 */
57 [[nodiscard]] Library *clone() const override = 0;
58
59 /**
60 Allocate a new object which can serve as a placeholder for the original
61 object in the Dictionary_client's dropped registry. Such object has the
62 same keys as the original but has no other info and as result occupies
63 less memory.
64 */
65 [[nodiscard]] Library *clone_dropped_object_placeholder() const override = 0;
66
67 static void create_mdl_key(const String_type &schema_name,
68 const String_type &name, MDL_key *key) {
70 }
71};
72
73///////////////////////////////////////////////////////////////////////////
74
75} // namespace dd
76
77#endif // DD__LIBRARY_INCLUDED
virtual const String_type & name() const =0
Definition: library_impl.h:43
Definition: library.h:37
Library * clone() const override=0
Allocate a new object graph and invoke the copy constructor for each object.
Library_impl Impl
Definition: library.h:39
static void create_mdl_key(const String_type &schema_name, const String_type &name, MDL_key *key)
Definition: library.h:67
~Library() override=default
bool update_name_key(Name_key *key) const override
Definition: library.h:41
Library * clone_dropped_object_placeholder() const override=0
Allocate a new object which can serve as a placeholder for the original object in the Dictionary_clie...
Definition: object_keys.h:434
Abstract base class for functions and procedures.
Definition: routine.h:61
virtual bool update_routine_name_key(Name_key *key, Object_id schema_id, const String_type &name) const =0
virtual Object_id schema_id() const =0
Routine_name_key Name_key
Definition: routine.h:67
@ RT_LIBRARY
Definition: routine.h:88
static void create_mdl_key(enum_routine_type type, const String_type &schema_name, const String_type &name, MDL_key *key)
Definition: routine_impl.cc:298
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
Metadata lock object key.
Definition: mdl.h:366