![]() |
MySQL 9.6.0
Source Code Documentation
|
#include <mysql/components/service.h>#include <mysql/components/services/bits/mysql_string_bits.h>#include "my_inttypes.h"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_imp * | my_h_string |
| The string functions as a service to the mysql_server component. More... | |
| typedef struct my_h_string_iterator_imp * | my_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 struct CHARSET_INFO_h_imp* CHARSET_INFO_h |
| 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.
| [in,out] | dest_string | Destination string. |
| src_buffer | Source buffer | |
| src_length | Length of the source buffer, in bytes | |
| src_charset | CHARSET is the source buffer |
| false | success |
| true | failure |
| 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.
| src_string | Source string to convert | |
| [out] | dest_buffer | Destination buffer |
| dest_length | Length, in charset characters, of the destination buffer | |
| dest_charset | Destination CHARSET, that is, character set to convert to |
| false | success |
| true | failure |
| typedef CHARSET_INFO_h(* get_charset_by_name_v1_t) (const char *name) |
Find a CHARSET_INFO by name.
| name | The character set name, expressed in ASCII, zero terminated. |
| typedef CHARSET_INFO_h(* get_charset_utf8mb4_v1_t) () |
Get the "utf8mb4" CHARSET_INFO.
| 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.
| typedef struct my_h_string_iterator_imp* my_h_string_iterator |
| typedef mysql_service_status_t(* mysql_string_append_v1_t) (my_h_string s1, my_h_string s2) |
Append a string.
| [in,out] | s1 | The string to append to. |
| [in] | s2 | The string to append. |
| typedef mysql_service_status_t(* mysql_string_compare_v1_t) (my_h_string s1, my_h_string s2, int *cmp) |
Compare two strings.
| [in] | s1 | First string to compare. |
| [in] | s2 | Second string to compare. |
| [out] | cmp | Comparison result (negative, zero, or positive) . |
| 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.
| [in] | s | String |
| [out] | buffer_pointer | String raw buffer. |
| [out] | buffer_length | String raw buffer size. |
| [out] | buffer_charset | String character set. |
| typedef mysql_service_status_t(* mysql_string_reset_v1_t) (my_h_string s) |
Reset a string to the empty string.
| [in,out] | s | The string to reset. |
| 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().
| [in] | in_string | String handle to extract substring from. |
| [in] | offset | Character offset of the substring. |
| [in] | count | Number of characters of the substring. |
| [out] | out_string | Pointer to string handle holding the created result string. |
| false | success |
| true | failure |