MySQL 8.4.0
Source Code Documentation
Charset_service Class Reference

Class that acquire/release the udf_metadata_service from registry service. More...

#include <udf_utils.h>

Static Public Member Functions

static bool init (const mysql_service_registry_t *reg_srv)
 Acquires the udf_metadata_service from the registry service. More...
 
static bool deinit (const mysql_service_registry_t *reg_srv)
 Release the udf_metadata service. More...
 
static bool set_return_value_charset (UDF_INIT *initid, const std::string &charset_name="latin1")
 Set the specified character set of UDF return value. More...
 
static bool set_args_charset (UDF_ARGS *args, const std::string &charset_name="latin1")
 Set the specified character set of all UDF arguments. More...
 

Static Private Attributes

static const char * arg_type
 
static const char * service_name
 
static const mysql_service_mysql_udf_metadata_tudf_metadata_service
 

Detailed Description

Class that acquire/release the udf_metadata_service from registry service.

It provides the APIs to set the character set of return value and arguments of UDFs using the udf_metadata service.

Member Function Documentation

◆ deinit()

bool Charset_service::deinit ( const mysql_service_registry_t reg_srv)
static

Release the udf_metadata service.

Parameters
[in]reg_srvRegistry service from which the udf_metadata service will be released.
Return values
trueif service could not be released
falseOtherwise

◆ init()

bool Charset_service::init ( const mysql_service_registry_t reg_srv)
static

Acquires the udf_metadata_service from the registry service.

Parameters
[in]reg_srvRegistry service from which udf_metadata service will be acquired
Return values
trueif service could not be acquired
falseOtherwise

◆ set_args_charset()

bool Charset_service::set_args_charset ( UDF_ARGS args,
const std::string &  charset_name = "latin1" 
)
static

Set the specified character set of all UDF arguments.

Parameters
[in]argsUDF_ARGS structure
[in]charset_nameCharacter set that has to be set. The default charset is set to 'latin1'
Return values
trueCould not set the character set of any of the argument
falseOtherwise

◆ set_return_value_charset()

bool Charset_service::set_return_value_charset ( UDF_INIT initid,
const std::string &  charset_name = "latin1" 
)
static

Set the specified character set of UDF return value.

Parameters
[in]initidUDF_INIT structure
[in]charset_nameCharacter set that has to be set. The default charset is set to 'latin1'
Return values
trueCould not set the character set of return value
falseOtherwise

Member Data Documentation

◆ arg_type

const char * Charset_service::arg_type
staticprivate

◆ service_name

const char * Charset_service::service_name
staticprivate

◆ udf_metadata_service

const mysql_service_mysql_udf_metadata_t * Charset_service::udf_metadata_service
staticprivate
Initial value:
=
nullptr

The documentation for this class was generated from the following files: