MySQL 8.0.39
Source Code Documentation
s_mysql_mysql_string_converter Struct Reference

Service for conversions, string to buffer and buffer to string. More...

#include <mysql_string.h>

Public Attributes

mysql_service_status_t(* convert_from_buffer )(my_h_string *out_string, const char *in_buffer, uint64 length, const char *charset_name)
 allocates a string object and converts the character buffer to string of specified charset_name. More...
 
mysql_service_status_t(* convert_to_buffer )(my_h_string in_string, char *out_buffer, uint64 length, const char *charset_name)
 converts the mysql_string to the character set specified by charset_name parameter. More...
 

Detailed Description

Service for conversions, string to buffer and buffer to string.

Status: Deprecated, use mysql_string_charset_converter instead.

Member Data Documentation

◆ convert_from_buffer

mysql_service_status_t(* s_mysql_mysql_string_converter::convert_from_buffer) (my_h_string *out_string, const char *in_buffer, uint64 length, const char *charset_name)

allocates a string object and converts the character buffer to string of specified charset_name.

please call destroy() api to free the allocated string after this api.

Parameters
[out]out_stringPointer to string object handle to set new string to.
in_bufferPointer to the buffer with data to be interpreted as string.
lengthLength of the buffer to copy into string, in bytes, not in character count.
charset_namecharset that is used for conversion.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

◆ convert_to_buffer

mysql_service_status_t(* s_mysql_mysql_string_converter::convert_to_buffer) (my_h_string in_string, char *out_buffer, uint64 length, const char *charset_name)

converts the mysql_string to the character set specified by charset_name parameter.

Parameters
in_stringPointer to string object handle to set new string to.
[out]out_bufferPointer to the buffer with data to be interpreted as characters.
lengthLength of the buffer to hold out put in characters.
charset_nameHandle to charset that is used for conversion.
Returns
Status of performed operation
Return values
falsesuccess
truefailure

The documentation for this struct was generated from the following file: