MySQL Connector/C++  2.0.4
MySQL connector library for C and C++ applications
Modules | Files | Macros | Typedefs | Enumerations
XAPI Functions

XAPI functions and types. More...

Modules

 Session operations
 
 Statements operating on document collections
 
 Statements operating on tables
 
 SQL execution
 
 DDL statements
 
 Statement execution
 
 Result processing
 
 Meta data access
 
 Diganostics
 

Files

file  mysql_xapi.h
 The main header for MySQL Connector/C++ XAPI.
 

Macros

#define RESULT_OK   0
 Return value indicating function/operation success. More...
 
#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. More...
 
#define RESULT_ERROR   128
 Return value flag indicating function/operation error. More...
 

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_session_options_struct mysqlx_session_options_t
 Type of handles for session configuration data. 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...
 

Enumerations

enum  mysqlx_data_type_t { ,
  MYSQLX_TYPE_SINT = 1, MYSQLX_TYPE_UINT = 2, MYSQLX_TYPE_DOUBLE = 5, MYSQLX_TYPE_FLOAT = 6,
  MYSQLX_TYPE_BYTES = 7, MYSQLX_TYPE_TIME = 10, MYSQLX_TYPE_DATETIME = 12, MYSQLX_TYPE_SET = 15,
  MYSQLX_TYPE_ENUM = 16, MYSQLX_TYPE_BIT = 17, MYSQLX_TYPE_DECIMAL = 18, MYSQLX_TYPE_BOOL = 19,
  MYSQLX_TYPE_JSON = 20, MYSQLX_TYPE_STRING = 21, MYSQLX_TYPE_GEOMETRY = 22, MYSQLX_TYPE_TIMESTAMP = 23,
  MYSQLX_TYPE_NULL = 100, MYSQLX_TYPE_EXPR = 101
}
 The data type identifiers used in MYSQLX API. More...
 
enum  mysqlx_sort_direction_t { SORT_ORDER_ASC = 1, SORT_ORDER_DESC = 2 }
 Sort directions in sorting operations such as ORDER BY. More...
 
enum  mysqlx_opt_type_t {
  MYSQLX_OPT_HOST = 1, MYSQLX_OPT_PORT = 2, MYSQLX_OPT_USER = 3, MYSQLX_OPT_PWD = 4,
  MYSQLX_OPT_DB = 5, MYSQLX_OPT_SSL_ENABLE = 6, MYSQLX_OPT_SSL_CA = 7
}
 Session options for use with mysqlx_session_option_get() and mysqlx_session_option_set() functions. More...
 
enum  mysqlx_view_algorithm_t { VIEW_ALGORITHM_UNDEFINED = 0, VIEW_ALGORITHM_MERGE = 1, VIEW_ALGORITHM_TEMPTABLE = 2 }
 Constants for defining the View algorithm using mysqlx_set_view_algorithm() function. More...
 
enum  mysqlx_view_security_t { VIEW_SECURITY_DEFINER = 1, VIEW_SECURITY_INVOKER = 2 }
 Constants for defining the View security using mysqlx_set_view_security() function. More...
 
enum  mysqlx_view_check_option_t { VIEW_CHECK_OPTION_CASCADED = 1, VIEW_CHECK_OPTION_LOCAL = 2 }
 Constants for defining the View check options mysqlx_set_view_security() function. More...
 

Macros used to declare view attributes

#define VIEW_ALGORITHM(A)    (void*)VIEW_OPTION_ALGORITHM, A
 Specify algorithm to be used for view processing. More...
 
#define VIEW_SECURITY(S)    (void*)VIEW_OPTION_SECURITY, S
 Specify view security context. More...
 
#define VIEW_DEFINER(D)    (void*)VIEW_OPTION_DEFINER, D
 Specify definer of a view. More...
 
#define VIEW_CHECK_OPTION(C)   (void*)VIEW_OPTION_CHECK_OPTION, C
 Specify checks to be performed for an updatable view. More...
 
#define VIEW_COLUMNS(...)    (void*)VIEW_OPTION_COLUMNS, __VA_ARGS__
 Specify names for view columns. More...
 

Detailed Description

XAPI functions and types.

See Connector/C++ 2.0 XAPI Reference for introduction.

Macro Definition Documentation

#define RESULT_OK   0

Return value indicating function/operation success.

#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.

#define RESULT_WARNING   64

Return value flag indicating that operation generated warnings.

#define RESULT_ERROR   128

Return value flag indicating function/operation error.

#define VIEW_ALGORITHM (   A)    (void*)VIEW_OPTION_ALGORITHM, A

Specify algorithm to be used for view processing.

See also
mysqlx_view_algorithm_t
#define VIEW_SECURITY (   S)    (void*)VIEW_OPTION_SECURITY, S

Specify view security context.

See also
mysqlx_view_security_t
#define VIEW_DEFINER (   D)    (void*)VIEW_OPTION_DEFINER, D

Specify definer of a view.

The definer is used to determine access rights for the view. It is specified as a valid MySQL account name of the form "user@host".

See also
https://dev.mysql.com/doc/refman/en/stored-programs-security.html
#define VIEW_CHECK_OPTION (   C)    (void*)VIEW_OPTION_CHECK_OPTION, C

Specify checks to be performed for an updatable view.

See also
mysqlx_view_check_option_t
#define VIEW_COLUMNS (   ...)    (void*)VIEW_OPTION_COLUMNS, __VA_ARGS__

Specify names for view columns.

The number of column names must match the number of columns of view's query.

Typedef Documentation

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.

See also
mysqlx_error()
typedef struct mysqlx_session_struct mysqlx_session_t

Type of session handles.

See also
mysqlx_get_session()
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.

See also
mysqlx_get_session_from_options(), mysqlx_session_options_new(), mysqlx_session_option_set(), mysqlx_free_options().
typedef struct mysqlx_schema_struct mysqlx_schema_t

Type of database schema handles.

See also
mysqlx_get_schema()
typedef struct mysqlx_collection_struct mysqlx_collection_t

Type of collection handles.

See also
mysqlx_get_collection()
typedef struct mysqlx_table_struct mysqlx_table_t

Type of table handles.

See also
mysqlx_get_table()
typedef struct mysqlx_stmt_struct mysqlx_stmt_t

Type of statement handles.

Some XAPI functions create statements without executing them. These functions return a statement handle which can be used to define statement properties and then execute it.

See also
mysqlx_sql_new(), mysqlx_table_select_new(), mysqlx_table_insert_new(), mysqlx_table_update_new(), mysqlx_table_delete_new(), mysqlx_collection_find_new(), mysqlx_collection_modify_new(), mysqlx_collection_add_new(), mysqlx_collection_remove_new()
typedef struct mysqlx_row_struct mysqlx_row_t

Type of row handles.

See also
mysqlx_row_fetch_one()
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.

See also
mysqlx_execute(), mysqlx_store_result(), mysqlx_row_fetch_one(), mysqlx_json_fetch_one(), mysqlx_next_result())

Enumeration Type Documentation

The data type identifiers used in MYSQLX API.

Enumerator
MYSQLX_TYPE_SINT 

64-bit signed integer number type

MYSQLX_TYPE_UINT 

64-bit unsigned integer number type

MYSQLX_TYPE_DOUBLE 

Floating point double number type.

MYSQLX_TYPE_FLOAT 

Floating point float number type.

MYSQLX_TYPE_BYTES 

Bytes array type.

MYSQLX_TYPE_TIME 

Time type.

MYSQLX_TYPE_DATETIME 

Datetime type.

MYSQLX_TYPE_SET 

Set type.

MYSQLX_TYPE_ENUM 

Enum type.

MYSQLX_TYPE_BIT 

Bit type.

MYSQLX_TYPE_DECIMAL 

Decimal type.

MYSQLX_TYPE_BOOL 

Bool type.

MYSQLX_TYPE_JSON 

JSON type.

MYSQLX_TYPE_STRING 

String type.

MYSQLX_TYPE_GEOMETRY 

Geometry type.

MYSQLX_TYPE_TIMESTAMP 

Timestamp type.

MYSQLX_TYPE_NULL 

NULL value.

MYSQLX_TYPE_EXPR 

Expression type.

Sort directions in sorting operations such as ORDER BY.

Enumerator
SORT_ORDER_ASC 

Ascending sorting (Default)

SORT_ORDER_DESC 

Descending sorting.

Session options for use with mysqlx_session_option_get() and mysqlx_session_option_set() functions.

Note
Specifying MYSQLX_OPT_SSL_CA option implies MYSQLX_OPT_SSL_ENABLE.
Enumerator
MYSQLX_OPT_HOST 

host name or IP address

MYSQLX_OPT_PORT 

DNS name of the host, IPv4 address or IPv6 address.

MYSQLX_OPT_USER 

user name

MYSQLX_OPT_PWD 

password

MYSQLX_OPT_DB 

default database

MYSQLX_OPT_SSL_ENABLE 

use TLS connection

MYSQLX_OPT_SSL_CA 

path to a PEM file specifying trusted root certificates

Constants for defining the View algorithm using mysqlx_set_view_algorithm() function.

See also
https://dev.mysql.com/doc/refman/en/view-algorithms.html
Enumerator
VIEW_ALGORITHM_UNDEFINED 

Undefined view algorithm.

VIEW_ALGORITHM_MERGE 

Merge view algorithm.

VIEW_ALGORITHM_TEMPTABLE 

Temptable view algorithm.

Constants for defining the View security using mysqlx_set_view_security() function.

See also
https://dev.mysql.com/doc/refman/en/stored-programs-security.html
Enumerator
VIEW_SECURITY_DEFINER 

Definer view security context.

VIEW_SECURITY_INVOKER 

Invoker view security context.

Constants for defining the View check options mysqlx_set_view_security() function.

See also
https://dev.mysql.com/doc/refman/en/view-check-option.html
Enumerator
VIEW_CHECK_OPTION_CASCADED 

Cascaded view check option.

VIEW_CHECK_OPTION_LOCAL 

Local view check option.