MySQL 8.4.2
Source Code Documentation
|
An implementation of mysql command services apis. More...
#include <mysql_command_services_imp.h>
Static Public Member Functions | |
static mysql_service_status_t | init (MYSQL_H *mysql_h) noexcept |
Calls mysql_init() api to Gets or initializes a MYSQL structure. More... | |
static mysql_service_status_t | connect (MYSQL_H mysql_h) noexcept |
Calls mysql_real_connect api to connect to a MySQL server. More... | |
static mysql_service_status_t | reset (MYSQL_H mysql_h) noexcept |
Calls mysql_reset_connection api to resets the connection to clear session state. More... | |
static mysql_service_status_t | close (MYSQL_H mysql_h) noexcept |
Calls mysql_close api to closes a server connection. More... | |
static mysql_service_status_t | commit (MYSQL_H mysql_h) noexcept |
Calls mysql_commit api to commits the transaction. More... | |
static mysql_service_status_t | autocommit (MYSQL_H mysql_h, bool mode) noexcept |
Calls mysql_autocommit api to toggles autocommit mode on/off. More... | |
static mysql_service_status_t | rollback (MYSQL_H mysql_h) noexcept |
Calls mysql_rollback api to rolls back the transaction. More... | |
static mysql_service_status_t | init (void) noexcept |
Calls session init_thread() to initialize a physical thread to use the session service. More... | |
static void | end (void) noexcept |
Calls session deinit_thread() to deinitialize a physical thread that has been using the session service. More... | |
static mysql_service_status_t | set (MYSQL_H mysql, int option, const void *arg) noexcept |
Calls mysql_options api to sets connect options for connection-establishment functions such as real_connect(). More... | |
static mysql_service_status_t | get (MYSQL_H mysql, int option, const void *arg) noexcept |
Calls mysql_get_option api to returns the value of a mysql_options() option. More... | |
static mysql_service_status_t | query (MYSQL_H mysql, const char *stmt_str, unsigned long length) noexcept |
Calls mysql_real_query api to executes an SQL query specified as a counted string. More... | |
static mysql_service_status_t | affected_rows (MYSQL_H mysql, uint64_t *rows) noexcept |
Calls mysql_affected_rows api to return the number of rows changed/deleted/inserted by the last UPDATE,DELETE or INSERT query. More... | |
static mysql_service_status_t | store_result (MYSQL_H mysql, MYSQL_RES_H *mysql_res) noexcept |
Calls mysql_store_result api to retrieves a complete result set. More... | |
static mysql_service_status_t | use_result (MYSQL_H mysql, MYSQL_RES_H *mysql_res) noexcept |
static mysql_service_status_t | free_result (MYSQL_RES_H mysql_res) noexcept |
Calls mysql_free_result api to frees memory used by a result set. More... | |
static mysql_service_status_t | more_results (MYSQL_H mysql) noexcept |
Calls mysql_more_results api to checks whether any more results exist. More... | |
static int | next_result (MYSQL_H mysql) noexcept |
Calls mysql_next_result api to returns/initiates the next result in multiple-result executions. More... | |
static mysql_service_status_t | result_metadata (MYSQL_RES_H res_h) noexcept |
Calls mysql_result_metadata api to check whether a result set has metadata. More... | |
static mysql_service_status_t | fetch_row (MYSQL_RES_H res_h, char ***row) noexcept |
Calls mysql_fetch_row api to fetches the next row from the result set. More... | |
static mysql_service_status_t | fetch_lengths (MYSQL_RES_H res_h, ulong **length) noexcept |
Calls mysql_fetch_lengths api to Returns the lengths of all columns in the current row. More... | |
static mysql_service_status_t | fetch_field (MYSQL_RES_H res_h, MYSQL_FIELD_H *field_h) noexcept |
Calls mysql_fetch_field api to returns the type of next table field. More... | |
static mysql_service_status_t | num_fields (MYSQL_RES_H res_h, unsigned int *num_fields) noexcept |
Calls mysql_num_fields api to returns the number of columns in a result set. More... | |
static mysql_service_status_t | fetch_fields (MYSQL_RES_H res_h, MYSQL_FIELD_H **fields_h) noexcept |
Calls mysql_fetch_fields api to returns an array of all field structures. More... | |
static mysql_service_status_t | field_count (MYSQL_H mysql_h, unsigned int *num_fields) noexcept |
Calls mysql_field_count api to returns the number of columns for the most resent statement. More... | |
static mysql_service_status_t | sql_errno (MYSQL_H mysql_h, unsigned int *err_no) noexcept |
Calls mysql_errno api to return the number of most recently invoked mysql function. More... | |
static mysql_service_status_t | sql_error (MYSQL_H mysql_h, char **errmsg) noexcept |
Calls mysql_error api to return the error message of most recently invoked mysql function. More... | |
static mysql_service_status_t | sql_state (MYSQL_H mysql_h, char **sqlstate_errmsg) noexcept |
Calls mysql_sqlstate api to return the SQLSTATE error code for the last error. More... | |
static mysql_service_status_t | field_metadata_get (MYSQL_FIELD_H field_h, int metadata, void *data) noexcept |
An implementation of mysql command services apis.
|
staticnoexcept |
Calls mysql_affected_rows api to return the number of rows changed/deleted/inserted by the last UPDATE,DELETE or INSERT query.
[in] | mysql_h | A valid mysql object. |
[out] | *rows | Number of rows affected, for SELECT stmt it tells about number of rows present. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_autocommit api to toggles autocommit mode on/off.
[in] | mysql_h | A valid mysql object. |
[in] | mode | Sets autocommit mode on if mode is 1, off if mode is 0. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_close api to closes a server connection.
[in] | mysql_h | A valid mysql object. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_commit api to commits the transaction.
[in] | mysql_h | A valid mysql object. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_real_connect api to connect to a MySQL server.
[in] | mysql_h | A valid mysql object. |
true | failure |
false | success |
|
staticnoexcept |
Calls session deinit_thread() to deinitialize a physical thread that has been using the session service.
|
staticnoexcept |
Calls mysql_fetch_field api to returns the type of next table field.
[in] | res_h | An mysql result object to return the next table field. |
[out] | *field_h | Stores the definition of one column of a result set as a MYSQL_FIELD structure |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_fetch_fields api to returns an array of all field structures.
[in] | res_h | A valid mysql result set object. |
[out] | **fields_h | Stores the array of all fields for a result set. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_fetch_lengths api to Returns the lengths of all columns in the current row.
[in] | res_h | An mysql result object to fetch a row from the result set. |
[out] | *length | lengths of all columns. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_fetch_row api to fetches the next row from the result set.
[in] | res_h | An mysql result object to fetch a row from the result set. |
[out] | *row_h | To store the fetched row |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_field_count api to returns the number of columns for the most resent statement.
[in] | mysql_h | A valid mysql handle object. |
[out] | *num_fields | Stores the number of columns for the last stmt. |
true | failure |
false | success |
|
staticnoexcept |
|
staticnoexcept |
Calls mysql_free_result api to frees memory used by a result set.
[in] | mysql_res_h | An mysql result object to free the result set. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_get_option api to returns the value of a mysql_options() option.
[in] | mysql_h | A valid mysql object. |
[in] | option | The option argument is the option that you want to get. |
[out] | arg | The arg argument is the value for the option to store. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_init() api to Gets or initializes a MYSQL structure.
[out] | mysql_h | Prepared mysql object from mysql_init call. |
true | failure |
false | success |
|
staticnoexcept |
Calls session init_thread() to initialize a physical thread to use the session service.
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_more_results api to checks whether any more results exist.
[in] | mysql_h | A valid mysql object. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_next_result api to returns/initiates the next result in multiple-result executions.
[in] | mysql_h | A valid mysql object. |
-1 | no more results |
>0 | error |
0 | if yes more results exits(keep looping) |
|
staticnoexcept |
Calls mysql_num_fields api to returns the number of columns in a result set.
[in] | res_h | A valid mysql result set object. |
[out] | *num_fields | Stores the number of columns in the result set. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_real_query api to executes an SQL query specified as a counted string.
[in] | mysql_h | A valid mysql object. |
[in] | stmt_str | SQL statement pointed to by the null-terminated string. The stmt is in mysql server character set. |
[in] | length | A string length bytes long. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_reset_connection api to resets the connection to clear session state.
[in] | mysql_h | A valid mysql object. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_result_metadata api to check whether a result set has metadata.
[in] | res_h | An mysql result object to get the metadata info. metadata_info Tells metadata is present or not. 0 for none 1 for present |
true | failure metadata_info not present. |
false | success metadata_info present. |
|
staticnoexcept |
Calls mysql_rollback api to rolls back the transaction.
[in] | mysql_h | A valid mysql object. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_options api to sets connect options for connection-establishment functions such as real_connect().
[in] | mysql_h | A valid mysql object. |
[in] | option | The option argument is the option that you want to set. |
[in] | arg | The arg argument is the value for the option. |
-----------—+----------------------------—+-----------------------------—+ Type | Option |Explanation | -----------—+----------------------------—+-----------------------------—+ const char * |MYSQL_COMMAND_CONSUMER_SERVICE |The service (implementation) | | |name/prefix to look for in the | | |registry and direct all the | | |calls to. | -----------—+----------------------------—+-----------------------------—+ MYSQL_THD |MYSQL_COMMAND_LOCAL_THD_HANDLE |The THD to run the query in. | | |If null a new internal THD will | | |be created. | -----------—+----------------------------—+-----------------------------—+ const char * |MYSQL_COMMAND_PROTOCOL |Could be valid socket meaning co| | |nnect to remote server, could be| | |"local"(default) meaning connect| | |to the current server. | -----------—+----------------------------—+-----------------------------—+ const char * |MYSQL_COMMAND_USER_NAME |The user name to send to the | | |server/set into the thread's | | |security context. | -----------—+----------------------------—+-----------------------------—+ const char * |MYSQL_COMMAND_HOST_NAME |The host name to use to | | |connect/set into the thread's | | |security context. | -----------—+----------------------------—+-----------------------------—+ int |MYSQL_COMMAND_TCPIP_PORT |The port to use to connect. | -----------—+----------------------------—+-----------------------------—+ bool |MYSQL_NO_LOCK_REGISTRY |Flag to use the _no_lock | | |implementation of registry | | |service. | -----------—+----------------------------—+-----------------------------—+
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_errno api to return the number of most recently invoked mysql function.
[in] | mysql_h | A valid mysql handle object. |
[out] | *err_no | Stores the error number of last mysql function. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_error api to return the error message of most recently invoked mysql function.
[in] | mysql_h | A valid mysql handle object. |
[out] | *errmsg | Stores the error message of last mysql function. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_sqlstate api to return the SQLSTATE error code for the last error.
[in] | mysql_h | A valid mysql handle object. |
[out] | *sqlstate_errmsg | Stores the SQLSTATE error message of the most recently executed SQL stmt. |
true | failure |
false | success |
|
staticnoexcept |
Calls mysql_store_result api to retrieves a complete result set.
[in] | mysql_h | A valid mysql object. |
[out] | *mysql_res | An mysql result object to get the result set. |
true | failure |
false | success |
|
staticnoexcept |