MySQL 9.1.0
Source Code Documentation
udf_metadata_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef UDF_METADATA_IMP_H
25#define UDF_METADATA_IMP_H
26
31
32extern REQUIRES_SERVICE_PLACEHOLDER(mysql_udf_metadata);
33
34/**
35 A helper class for the implementation of the udf_extension functions
36
37 Needed because we register these service implementations
38 as part of the mysql_server component.
39*/
41 public: /* service implementations */
42 /* Retrieves the extension argument from a UDF argument. */
44 (UDF_ARGS * udf_args, const char *extension_type,
45 unsigned int index, void **out_value));
46
47 /* Retrieves the extension argument from return value of UDF. */
49 (UDF_INIT * udf_init, const char *extension_type,
50 void **argument));
51 /* Sets the extension argument for a UDF argument. */
53 (UDF_ARGS * udf_args, const char *extension_type,
54 unsigned int index, void *in_value));
55
56 /* Sets the extension argument for a return value of UDF. */
58 (UDF_INIT * udf_init, const char *extension_type,
59 void *argument));
60};
61
62#endif // UDF_METADATA_IMP_H
A helper class for the implementation of the udf_extension functions.
Definition: udf_metadata_imp.h:40
static mysql_service_status_t argument_get(UDF_ARGS *udf_args, const char *extension_type, unsigned int index, void **out_value) noexcept
Definition: udf_metadata_imp.cc:111
static mysql_service_status_t argument_set(UDF_ARGS *udf_args, const char *extension_type, unsigned int index, void *in_value) noexcept
Definition: udf_metadata_imp.cc:44
static mysql_service_status_t result_set(UDF_INIT *udf_init, const char *extension_type, void *argument) noexcept
Definition: udf_metadata_imp.cc:78
static mysql_service_status_t result_get(UDF_INIT *udf_init, const char *extension_type, void **argument) noexcept
Definition: udf_metadata_imp.cc:132
Specifies macros to define Components.
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
Definition: udf_registration_types.h:48
Information about the result of a user defined function.
Definition: udf_registration_types.h:66
REQUIRES_SERVICE_PLACEHOLDER(mysql_udf_metadata)