MySQL 8.0.39
Source Code Documentation
|
The string functions as a service to the mysql_server component. More...
#include <mysql_string_service_imp.h>
Static Public Member Functions | |
static CHARSET_INFO_h | get_charset_utf8mb4 () noexcept |
static CHARSET_INFO_h | get_charset_by_name (const char *name) noexcept |
static mysql_service_status_t | create (my_h_string *out_string) noexcept |
Creates a new instance of string object. More... | |
static void | destroy (my_h_string string) noexcept |
Destroys specified string object and data contained by it. More... | |
static mysql_service_status_t | tolower (my_h_string *out_string, my_h_string in_string) noexcept |
Convert a String pointed by handle to lower case. More... | |
static mysql_service_status_t | toupper (my_h_string *out_string, my_h_string in_string) noexcept |
Convert a String pointed by handle to upper case. More... | |
static mysql_service_status_t | convert_from_buffer (my_h_string *out_string, const char *in_buffer, uint64 length, const char *charset_name) noexcept |
Allocates a string object and converts the character buffer to string and just sets the specified charset_name in the string object. More... | |
static mysql_service_status_t | convert_to_buffer (my_h_string in_string, char *out_buffer, uint64 length, const char *charset_name) noexcept |
Converts the mysql_string to the character set specified by charset_name parameter. More... | |
static mysql_service_status_t | convert_from_buffer_v2 (my_h_string dest_string, const char *src_buffer, uint64 src_length, CHARSET_INFO_h src_charset) noexcept |
static mysql_service_status_t | convert_to_buffer_v2 (my_h_string src_string, char *dest_buffer, uint64 dest_length, CHARSET_INFO_h dest_charset) noexcept |
static mysql_service_status_t | get_char (my_h_string string, uint index, ulong *out_char) noexcept |
Gets character code of character on specified index position in string to a specified buffer. More... | |
static mysql_service_status_t | get_char_length (my_h_string string, uint *out_length) noexcept |
Gets length of specified string expressed as number of characters. More... | |
static mysql_service_status_t | get_byte (my_h_string string, uint index, uint *out_char) noexcept |
Gets byte code of string at specified index position to a specified 32-bit buffer. More... | |
static mysql_service_status_t | get_byte_length (my_h_string string, uint *out_length) noexcept |
Gets length of specified string expressed as number of bytes. More... | |
static mysql_service_status_t | iterator_create (my_h_string string, my_h_string_iterator *out_iterator) noexcept |
Creates an iterator for a specified string to allow iteration through all characters in the string. More... | |
static mysql_service_status_t | iterator_get_next (my_h_string_iterator iter, int *out_char) noexcept |
Retrieves character code at current iterator position and advances the iterator. More... | |
static void | iterator_destroy (my_h_string_iterator iter) noexcept |
Releases the string iterator object specified. More... | |
static mysql_service_status_t | is_upper (my_h_string_iterator iter, bool *out) noexcept |
Checks if character on current position the iterator points to is an upper case. More... | |
static mysql_service_status_t | is_lower (my_h_string_iterator iter, bool *out) noexcept |
Checks if character on current position the iterator points to is a lower case. More... | |
static mysql_service_status_t | is_digit (my_h_string_iterator iter, bool *out) noexcept |
Checks if character on current position the iterator points to is a digit. More... | |
static mysql_service_status_t | get (my_h_string_iterator iter, ulong *out) noexcept |
Retrieves character value at current iterator position. More... | |
static mysql_service_status_t | reset (my_h_string s) noexcept |
static mysql_service_status_t | append (my_h_string s1, my_h_string s2) noexcept |
static mysql_service_status_t | substr (my_h_string in_string, uint offset, uint count, my_h_string *out_string) noexcept |
Allocates a string object and sets it value as substring of the input string. More... | |
static mysql_service_status_t | compare (my_h_string s1, my_h_string s2, int *cmp) noexcept |
static mysql_service_status_t | get_data (my_h_string s, const char **buffer_pointer, size_t *buffer_length, CHARSET_INFO_h *buffer_charset) noexcept |
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. successful invocations of the underlying String Service Implementation methods.
|
staticnoexcept |
|
staticnoexcept |
|
staticnoexcept |
Allocates a string object and converts the character buffer to string and just sets the specified charset_name in the string object.
It does not performs the conversion of buffer into the specified character set. Caller must free the allocated string by calling destroy() api.
[out] | out_string | Pointer to string object handle to set new string to. |
in_buffer | Pointer to the buffer with data to be interpreted as string. | |
length | Length of the buffer to copy into string, in bytes, not in character count. | |
charset_name | charset that is used for conversion. |
false | success |
true | failure |
|
staticnoexcept |
|
staticnoexcept |
Converts the mysql_string to the character set specified by charset_name parameter.
in_string | Pointer to string object handle to set new string to. | |
[out] | out_buffer | Pointer to the buffer with data to be interpreted as characters. |
length | Length of the buffer to hold out put in characters. | |
charset_name | charset that is used for conversion. |
false | success |
true | failure |
|
staticnoexcept |
|
staticnoexcept |
Creates a new instance of string object.
out_string | holds pointer to newly created string object. |
false | success |
true | failure |
|
staticnoexcept |
Destroys specified string object and data contained by it.
string | String object handle to release. |
|
staticnoexcept |
Retrieves character value at current iterator position.
iter | String iterator object handle | |
[out] | out | Pointer to long value to store character to |
false | success |
true | failure |
|
staticnoexcept |
Gets byte code of string at specified index position to a specified 32-bit buffer.
string | String object handle to get character from. | |
index | Index, position of character to query. | |
[out] | out_char | Pointer to 32bit value to store byte to. |
false | success |
true | failure |
|
staticnoexcept |
Gets length of specified string expressed as number of bytes.
string | String object handle to get length of. | |
[out] | out_length | Pointer to 32bit value to store length of string to. |
false | success |
true | failure |
|
staticnoexcept |
Gets character code of character on specified index position in string to a specified buffer.
string | String object handle to get character from. | |
index | Index, position of character to query. | |
[out] | out_char | Pointer to unsigned long value to store character to. |
false | success |
true | failure |
|
staticnoexcept |
Gets length of specified string expressed as number of characters.
string | String object handle to get length of. | |
[out] | out_length | Pointer to 64bit value to store length of string to. |
false | success |
true | failure |
|
staticnoexcept |
|
staticnoexcept |
|
staticnoexcept |
|
staticnoexcept |
Checks if character on current position the iterator points to is a digit.
iter | String iterator object handle to advance. | |
[out] | out | Pointer to bool value to store if character is a digit. |
false | success |
true | failure |
|
staticnoexcept |
Checks if character on current position the iterator points to is a lower case.
iter | String iterator object handle to advance. | |
[out] | out | Pointer to bool value to store if character is a lower case. |
false | success |
true | failure |
|
staticnoexcept |
Checks if character on current position the iterator points to is an upper case.
iter | String iterator object handle to advance. | |
[out] | out | Pointer to bool value to store if character is an upper case. |
false | success |
true | failure |
|
staticnoexcept |
Creates an iterator for a specified string to allow iteration through all characters in the string.
string | String object handle to get iterator to. | |
[out] | out_iterator | Pointer to string iterator handle to store result object to. |
false | success |
true | failure |
|
staticnoexcept |
Releases the string iterator object specified.
iter | String iterator object handle to release. |
|
staticnoexcept |
Retrieves character code at current iterator position and advances the iterator.
iter | String iterator object handle to advance. | |
[out] | out_char | Pointer to 64bit value to store character to. May be NULL to omit retrieval of character and just advance the iterator. |
false | success |
true | failure |
|
staticnoexcept |
|
staticnoexcept |
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 |
|
staticnoexcept |
Convert a String pointed by handle to lower case.
Conversion depends on the client character set info
out_string | Holds the converted lower case string object. |
in_string | Pointer to string object to be converted. |
false | success |
true | failure |
|
staticnoexcept |
Convert a String pointed by handle to upper case.
Conversion depends on the client character set info
out_string | Holds the converted upper case string object. |
in_string | Pointer to string object to be converted. |
false | success |
true | failure |