MySQL 8.0.30
Source Code Documentation
udf_metadata_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2020, 2022, 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 also distributed 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 included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef UDF_METADATA_IMP_H
24#define UDF_METADATA_IMP_H
25
30
31extern REQUIRES_SERVICE_PLACEHOLDER(mysql_udf_metadata);
32
33/**
34 A helper class for the implementation of the udf_extension functions
35
36 Needed because we register these service implementations
37 as part of the mysql_server component.
38*/
40 public: /* service implementations */
41 /* Retrieves the extension argument from a UDF argument. */
43 (UDF_ARGS * udf_args, const char *extension_type,
44 unsigned int index, void **out_value));
45
46 /* Retrieves the extension argument from return value of UDF. */
48 (UDF_INIT * udf_init, const char *extension_type,
49 void **argument));
50 /* Sets the extension argument for a UDF argument. */
52 (UDF_ARGS * udf_args, const char *extension_type,
53 unsigned int index, void *in_value));
54
55 /* Sets the extension argument for a return value of UDF. */
57 (UDF_INIT * udf_init, const char *extension_type,
58 void *argument));
59};
60
61#endif // UDF_METADATA_IMP_H
A helper class for the implementation of the udf_extension functions.
Definition: udf_metadata_imp.h:39
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:109
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:42
static mysql_service_status_t result_set(UDF_INIT *udf_init, const char *extension_type, void *argument) noexcept
Definition: udf_metadata_imp.cc:76
static mysql_service_status_t result_get(UDF_INIT *udf_init, const char *extension_type, void **argument) noexcept
Definition: udf_metadata_imp.cc:130
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:87
Definition: udf_registration_types.h:47
Information about the result of a user defined function.
Definition: udf_registration_types.h:65
REQUIRES_SERVICE_PLACEHOLDER(mysql_udf_metadata)