|
MySQL Connector/C++ 9.5.0
MySQL connector library for C and C++ applications
|
Functions and types defined by X DevAPI for C. More...
Modules | |
| Session operations | |
| Statements operating on document collections | |
| Statements operating on tables | |
| SQL execution | |
| DDL statements | |
| Statement execution | |
| Result processing | |
| Meta data access | |
| Diagnostics | |
Files | |
| file | xapi.h |
| The main header for MySQL Connector/C++ X DevAPI for C. | |
Functions | |
| mysqlx_session_t * | mysqlx_get_session_from_client (mysqlx_client_t *cli, mysqlx_error_t **error) |
| Create a new session. More... | |
Macros | |
| #define | RESULT_OK 0 |
| Return value indicating function/operation success. | |
| #define | RESULT_MORE_DATA 8 |
| Return value flag indicating that the last reading operation did not finish reading to the end and there is still more data to be fetched by functions such as mysqlx_get_bytes() | |
| #define | RESULT_NULL 16 |
| Return value flag indicating end of data items (documents or rows) in a query result. More... | |
| #define | RESULT_INFO 32 |
| Return value flag indicating that operation generated information diagnostic entries. | |
| #define | RESULT_WARNING 64 |
| Return value flag indicating that operation generated warnings. | |
| #define | RESULT_ERROR 128 |
| Return value flag indicating function/operation error. | |
Typedefs | |
| typedef struct mysqlx_error_struct | mysqlx_error_t |
| Type of error handles. More... | |
| typedef struct mysqlx_session_struct | mysqlx_session_t |
| Type of session handles. More... | |
| typedef struct mysqlx_client_struct | mysqlx_client_t |
| Type of client handles. More... | |
| typedef struct mysqlx_session_options_struct | mysqlx_session_options_t |
| Type of handles for session configuration data. More... | |
| typedef struct mysqlx_collection_options_struct | mysqlx_collection_options_t |
| Type of handles for collection create/modify options. More... | |
| typedef struct mysqlx_schema_struct | mysqlx_schema_t |
| Type of database schema handles. More... | |
| typedef struct mysqlx_collection_struct | mysqlx_collection_t |
| Type of collection handles. More... | |
| typedef struct mysqlx_table_struct | mysqlx_table_t |
| Type of table handles. More... | |
| typedef struct mysqlx_stmt_struct | mysqlx_stmt_t |
| Type of statement handles. More... | |
| typedef struct mysqlx_row_struct | mysqlx_row_t |
| Type of row handles. More... | |
| typedef struct mysqlx_result_struct | mysqlx_result_t |
| Type of result handles. More... | |
Functions and types defined by X DevAPI for C.
See Connector/C++ X DevAPI for C Example for introduction.
| #define RESULT_NULL 16 |
Return value flag indicating end of data items (documents or rows) in a query result.
This is used by functions which iterate over result data.
| typedef struct mysqlx_error_struct mysqlx_error_t |
Type of error handles.
Error handles give access to diagnostic information from the session and statement operations.
| typedef struct mysqlx_session_struct mysqlx_session_t |
Type of session handles.
| typedef struct mysqlx_client_struct mysqlx_client_t |
Type of client handles.
| typedef struct mysqlx_session_options_struct mysqlx_session_options_t |
Type of handles for session configuration data.
Session can be created using previously prepared session configuration data. New configuration data is allocated by mysqlx_session_options_new() and can be manipulated using related functions.
| typedef struct mysqlx_collection_options_struct mysqlx_collection_options_t |
Type of handles for collection create/modify options.
| typedef struct mysqlx_schema_struct mysqlx_schema_t |
Type of database schema handles.
| typedef struct mysqlx_collection_struct mysqlx_collection_t |
Type of collection handles.
| typedef struct mysqlx_table_struct mysqlx_table_t |
Type of table handles.
| typedef struct mysqlx_stmt_struct mysqlx_stmt_t |
Type of statement handles.
Some X DevAPI for C functions create statements without executing them. These functions return a statement handle which can be used to define statement properties and then execute it.
| typedef struct mysqlx_row_struct mysqlx_row_t |
Type of row handles.
| typedef struct mysqlx_result_struct mysqlx_result_t |
Type of result handles.
Functions which produce results return a result handle which is then used to examine the result.
| enum mysqlx_data_type_t |
The data type identifiers used in MYSQLX API.
Client options for use with mysqlx_session_option_get() and mysqlx_session_option_set() functions.
| enum mysqlx_opt_type_t |
Session options for use with mysqlx_session_option_get() and mysqlx_session_option_set() functions.
MYSQLX_OPT_SSL_CA option requires MYSQLX_OPT_SSL_MODE value of SSL_MODE_VERIFY_CA or SSL_MODE_VERIFY_IDENTITY. If MYSQLX_OPT_SSL_MODE is not explicitly given then setting MYSQLX_OPT_SSL_CA implies SSL_MODE_VERIFY_CA.| Enumerator | |
|---|---|
| MYSQLX_OPT_URI | connection URI or string |
| MYSQLX_OPT_HOST | DNS name of the host, IPv4 address or IPv6 address |
| MYSQLX_OPT_PORT | X Plugin port to connect to |
| MYSQLX_OPT_PRIORITY | Assign a priority (a number in range 1 to 100) to the last specified host; these priorities are used to determine the order in which multiple hosts are tried by the connection fail-over logic (see description of |
| MYSQLX_OPT_USER | user name |
| MYSQLX_OPT_PWD | password |
| MYSQLX_OPT_DB | default database |
| MYSQLX_OPT_SSL_MODE | Specify SSLMode option to be used. In plain C code the value should be a |
| MYSQLX_OPT_SSL_CA | path to a PEM file specifying trusted root certificates |
| MYSQLX_OPT_AUTH | Authentication method to use, see AuthMethod. In plain C code the value should be a |
| MYSQLX_OPT_SOCKET | unix socket path |
| MYSQLX_OPT_CONNECT_TIMEOUT | Sets connection timeout in milliseconds. In C++ code can be also set to a |
| MYSQLX_OPT_CONNECTION_ATTRIBUTES | Specifies connection attributes (key-value pairs) to be sent when a session is created. The value is a JSON string (in C++ code can be also a |
| MYSQLX_OPT_TLS_VERSIONS | List of allowed TLS protocol versions, such as "TLSv1.2". The value is a string with comma separated versions. In C++ code it can also be an iterable container with versions. |
| MYSQLX_OPT_TLS_CIPHERSUITES | List of allowed TLS cipher suites. The value is a string with comma separated IANA cipher suitenames (such as "TLS_RSA_WITH_3DES_EDE_CBC_SHA"). In C++ code it can also be an iterable container with names. Unknown cipher suites are silently ignored. |
| MYSQLX_OPT_DNS_SRV | If enabled (true) will check hostname for DNS SRV record and use its configuration (hostname, port, priority and weight) to connect. |
| MYSQLX_OPT_COMPRESSION | enable or disable compression |
| MYSQLX_OPT_COMPRESSION_ALGORITHMS | Specify compression algorithms in order of preference |
| MYSQLX_OPT_SSL_CAPATH | Path to a directory containing PEM files specifying trusted root certificates. |
| MYSQLX_OPT_SSL_CRL | Path to a PEM file containing certificate revocation lists |
| MYSQLX_OPT_SSL_CRLPATH | Path to a directory containing PEM files with certificate revocation lists |
| MYSQLX_OPT_READ_TIMEOUT | Sets read timeout in milliseconds. In C++ code can be also set to a |
| MYSQLX_OPT_WRITE_TIMEOUT | Sets write timeout in milliseconds. In C++ code can be also set to a |
| enum mysqlx_ssl_mode_t |
Session SSL mode values for use with mysqlx_session_option_get() and mysqlx_session_option_set() functions setting or getting MYSQLX_OPT_SSL_MODE option.
| enum mysqlx_auth_method_t |
Authentication method values for use with mysqlx_session_option_get() and mysqlx_session_option_set() functions setting or getting MYSQLX_OPT_AUTH option.
Collection validation options.
| Enumerator | |
|---|---|
| MYSQLX_OPT_COLLECTION_VALIDATION_SCHEMA | Collection validation schema, as defined by https://dev.mysql.com/doc/refman/8.0/en/json-validation-functions.html#function_json-schema-valid |
| MYSQLX_OPT_COLLECTION_VALIDATION_LEVEL | Defines level of validation on the collection, see CollectionValidation::Level. In plain C code the value should be mysqlx_collection_validation_level_t. |
Compression modes.
TODO: see...
| enum mysqlx_row_locking_t |
Constants for defining the row locking options for mysqlx_set_row_locking() function.
Constants for defining the row locking options for mysqlx_set_row_locking() function.
| mysqlx_session_t * mysqlx_get_session_from_client | ( | mysqlx_client_t * | cli, |
| mysqlx_error_t ** | error | ||
| ) |
Create a new session.
| cli | client pool to get session from | |
| [out] | error | if error happens during connect the error object is returned through this parameter |
mysqlx_free().