MySQL 8.0.39
Source Code Documentation
mysql_string.h File Reference

Go to the source code of this file.

Classes

struct  s_mysql_mysql_charset
 Lookup available character sets. More...
 
struct  s_mysql_mysql_string_factory
 Service for String create and destroy. More...
 
struct  s_mysql_mysql_string_case
 Service for String case conversions, to lower case and to upper case. More...
 
struct  s_mysql_mysql_string_converter
 Service for conversions, string to buffer and buffer to string. More...
 
struct  s_mysql_mysql_string_charset_converter
 Service for conversions, string to buffer and buffer to string. More...
 
struct  s_mysql_mysql_string_character_access
 Service to get a character in String and number of characters in string. More...
 
struct  s_mysql_mysql_string_byte_access
 Service to get a byte in String and number of bytes in string. More...
 
struct  s_mysql_mysql_string_iterator
 Service for listing Strings by iterator. More...
 
struct  s_mysql_mysql_string_ctype
 Service for String c_type. More...
 
struct  s_mysql_mysql_string_value
 Service for retrieving one character from a string. More...
 
struct  s_mysql_mysql_string_reset
 Reset a string to the empty string. More...
 
struct  s_mysql_mysql_string_substr
 Substring a string. More...
 
struct  s_mysql_mysql_string_append
 Append a string to another one. More...
 
struct  s_mysql_mysql_string_compare
 Compare two strings. More...
 
struct  s_mysql_mysql_string_get_data_in_charset
 Access the string raw data. More...
 

Typedefs

typedef struct CHARSET_INFO_h_imp * CHARSET_INFO_h
 
typedef CHARSET_INFO_h(* get_charset_utf8mb4_v1_t) ()
 Get the "utf8mb4" CHARSET_INFO. More...
 
typedef CHARSET_INFO_h(* get_charset_by_name_v1_t) (const char *name)
 Find a CHARSET_INFO by name. More...
 
typedef struct s_mysql_mysql_charset mysql_service_mysql_charset_t
 Lookup available character sets. More...
 
typedef struct my_h_string_impmy_h_string
 The string functions as a service to the mysql_server component. More...
 
typedef struct my_h_string_iterator_impmy_h_string_iterator
 
typedef struct s_mysql_mysql_string_factory mysql_service_mysql_string_factory_t
 Service for String create and destroy. More...
 
typedef struct s_mysql_mysql_string_case mysql_service_mysql_string_case_t
 Service for String case conversions, to lower case and to upper case. More...
 
typedef struct s_mysql_mysql_string_converter mysql_service_mysql_string_converter_t
 Service for conversions, string to buffer and buffer to string. More...
 
typedef mysql_service_status_t(* convert_from_buffer_v2_t) (my_h_string dest_string, const char *src_buffer, uint64 src_length, CHARSET_INFO_h src_charset)
 Converts a character buffer to string of specified charset to a string object. More...
 
typedef mysql_service_status_t(* convert_to_buffer_v2_t) (my_h_string src_string, char *dest_buffer, uint64 dest_length, CHARSET_INFO_h dest_charset)
 Converts the mysql_string to a given character set. More...
 
typedef struct s_mysql_mysql_string_charset_converter mysql_service_mysql_string_charset_converter_t
 Service for conversions, string to buffer and buffer to string. More...
 
typedef struct s_mysql_mysql_string_character_access mysql_service_mysql_string_character_access_t
 Service to get a character in String and number of characters in string. More...
 
typedef struct s_mysql_mysql_string_byte_access mysql_service_mysql_string_byte_access_t
 Service to get a byte in String and number of bytes in string. More...
 
typedef struct s_mysql_mysql_string_iterator mysql_service_mysql_string_iterator_t
 Service for listing Strings by iterator. More...
 
typedef struct s_mysql_mysql_string_ctype mysql_service_mysql_string_ctype_t
 Service for String c_type. More...
 
typedef struct s_mysql_mysql_string_value mysql_service_mysql_string_value_t
 Service for retrieving one character from a string. More...
 
typedef mysql_service_status_t(* mysql_string_reset_v1_t) (my_h_string s)
 Reset a string to the empty string. More...
 
typedef struct s_mysql_mysql_string_reset mysql_service_mysql_string_reset_t
 Reset a string to the empty string. More...
 
typedef mysql_service_status_t(* mysql_string_substr_v1_t) (my_h_string in_string, uint offset, uint count, my_h_string *out_string)
 Substring. More...
 
typedef struct s_mysql_mysql_string_substr mysql_service_mysql_string_substr_t
 Substring a string. More...
 
typedef mysql_service_status_t(* mysql_string_append_v1_t) (my_h_string s1, my_h_string s2)
 Append a string. More...
 
typedef struct s_mysql_mysql_string_append mysql_service_mysql_string_append_t
 Append a string to another one. More...
 
typedef mysql_service_status_t(* mysql_string_compare_v1_t) (my_h_string s1, my_h_string s2, int *cmp)
 Compare two strings. More...
 
typedef struct s_mysql_mysql_string_compare mysql_service_mysql_string_compare_t
 Compare two strings. More...
 
typedef mysql_service_status_t(* mysql_string_get_data_v1_t) (my_h_string s, const char **buffer_pointer, size_t *buffer_length, CHARSET_INFO_h *buffer_charset)
 Access the string raw data. More...
 
typedef struct s_mysql_mysql_string_get_data_in_charset mysql_service_mysql_string_get_data_in_charset_t
 Access the string raw data. More...
 

Typedef Documentation

◆ CHARSET_INFO_h

typedef struct CHARSET_INFO_h_imp* CHARSET_INFO_h

◆ convert_from_buffer_v2_t

typedef mysql_service_status_t(* convert_from_buffer_v2_t) (my_h_string dest_string, const char *src_buffer, uint64 src_length, CHARSET_INFO_h src_charset)

Converts a character buffer to string of specified charset to a string object.

The caller provides the destination string object, which content will be modified.

Parameters
[in,out]dest_stringDestination string.
src_bufferSource buffer
src_lengthLength of the source buffer, in bytes
src_charsetCHARSET is the source buffer
Returns
Conversion status
Return values
falsesuccess
truefailure

◆ convert_to_buffer_v2_t

typedef mysql_service_status_t(* convert_to_buffer_v2_t) (my_h_string src_string, char *dest_buffer, uint64 dest_length, CHARSET_INFO_h dest_charset)

Converts the mysql_string to a given character set.

Parameters
src_stringSource string to convert
[out]dest_bufferDestination buffer
dest_lengthLength, in charset characters, of the destination buffer
dest_charsetDestination CHARSET, that is, character set to convert to
Returns
Conversion status
Return values
falsesuccess
truefailure

◆ get_charset_by_name_v1_t

typedef CHARSET_INFO_h(* get_charset_by_name_v1_t) (const char *name)

Find a CHARSET_INFO by name.

Parameters
nameThe character set name, expressed in ASCII, zero terminated.

◆ get_charset_utf8mb4_v1_t

typedef CHARSET_INFO_h(* get_charset_utf8mb4_v1_t) ()

Get the "utf8mb4" CHARSET_INFO.

◆ my_h_string

typedef struct my_h_string_imp* my_h_string

The string functions as a service to the mysql_server component.

So, that by default this service is available to all the components register to the server.

◆ my_h_string_iterator

◆ mysql_string_append_v1_t

typedef mysql_service_status_t(* mysql_string_append_v1_t) (my_h_string s1, my_h_string s2)

Append a string.

Parameters
[in,out]s1The string to append to.
[in]s2The string to append.

◆ mysql_string_compare_v1_t

typedef mysql_service_status_t(* mysql_string_compare_v1_t) (my_h_string s1, my_h_string s2, int *cmp)

Compare two strings.

Parameters
[in]s1First string to compare.
[in]s2Second string to compare.
[out]cmpComparison result (negative, zero, or positive) .

◆ mysql_string_get_data_v1_t

typedef mysql_service_status_t(* mysql_string_get_data_v1_t) (my_h_string s, const char **buffer_pointer, size_t *buffer_length, CHARSET_INFO_h *buffer_charset)

Access the string raw data.

The raw data returned is usable only while the string object is valid.

Parameters
[in]sString
[out]buffer_pointerString raw buffer.
[out]buffer_lengthString raw buffer size.
[out]buffer_charsetString character set.

◆ mysql_string_reset_v1_t

typedef mysql_service_status_t(* mysql_string_reset_v1_t) (my_h_string s)

Reset a string to the empty string.

Parameters
[in,out]sThe string to reset.

◆ mysql_string_substr_v1_t

typedef mysql_service_status_t(* mysql_string_substr_v1_t) (my_h_string in_string, uint offset, uint count, my_h_string *out_string)

Substring.

Allocates a string object and sets it value as substring of the input string. Caller must free the allocated string by calling destroy().

Parameters
[in]in_stringString handle to extract substring from.
[in]offsetCharacter offset of the substring.
[in]countNumber of characters of the substring.
[out]out_stringPointer to string handle holding the created result string.
Returns
Status of performed operation
Return values
falsesuccess
truefailure