|
MySQL Connector/C++ 9.5.0
MySQL connector library for C and C++ applications
|
Functions | |
| mysqlx_result_t * | mysqlx_sql (mysqlx_session_t *sess, const char *query, size_t query_len) |
| Execute a plain SQL query. More... | |
| mysqlx_result_t * | mysqlx_sql_param (mysqlx_session_t *sess, const char *query, size_t query_len,...) |
| Execute a plain SQL query with parameters. More... | |
| mysqlx_stmt_t * | mysqlx_sql_new (mysqlx_session_t *sess, const char *query, uint32_t length) |
| Create a statement which executes a plain SQL query. More... | |
| mysqlx_result_t * mysqlx_sql | ( | mysqlx_session_t * | sess, |
| const char * | query, | ||
| size_t | query_len | ||
| ) |
Execute a plain SQL query.
| sess | session handle |
| query | SQL query |
| query_len | length of the query. For NULL-terminated query strings MYSQLX_NULL_TERMINATED can be specified instead of the actual length |
mysqlx_error() function | mysqlx_result_t * mysqlx_sql_param | ( | mysqlx_session_t * | sess, |
| const char * | query, | ||
| size_t | query_len, | ||
| ... | |||
| ) |
Execute a plain SQL query with parameters.
| sess | session handle |
| query | SQL query |
| query_len | length of the query. For NULL-terminated query strings MYSQLX_NULL_TERMINATED can be specified instead of the actual length |
| ... | variable parameters list consisting of (type, value) pairs terminated by PARAM_END: type_id1, value1, type_id2, value2, ..., type_id_n, value_n, PARAM_END (PARAM_END marks the end of the parameters list). |
type_id is the numeric identifier, which helps to determine the type of the value provided as the next parameter. The user code must ensure that type_id corresponds to the actual value type. Otherwise, the value along with and all sequential types and values are most likely to be corrupted. Allowed types are listed in mysqlx_data_type_t enum. The X DevAPI for C defines the convenience macros that help to specify the types and values: See PARAM_SINT(), PARAM_UINT(), PARAM_FLOAT(), PARAM_DOUBLE(), PARAM_BYTES(), PARAM_STRING().
mysqlx_error() function | mysqlx_stmt_t * mysqlx_sql_new | ( | mysqlx_session_t * | sess, |
| const char * | query, | ||
| uint32_t | length | ||
| ) |
Create a statement which executes a plain SQL query.
? placeholders whose values should be specified using mysqlx_stmt_bind() function before executing the statement.| sess | session handle |
| query | SQL query |
| length | length of the query |
mysqlx_execute().