MySQL Connector/C++
MySQL connector library for C and C++ applications
Functions
Meta data access

Functions

uint16_t mysqlx_column_get_type (mysqlx_result_t *res, uint32_t pos)
 Get column type identifier. More...
 
uint16_t mysqlx_column_get_collation (mysqlx_result_t *res, uint32_t pos)
 Get column collation number. More...
 
uint32_t mysqlx_column_get_length (mysqlx_result_t *res, uint32_t pos)
 Get column length. More...
 
uint16_t mysqlx_column_get_precision (mysqlx_result_t *res, uint32_t pos)
 Get column precision. More...
 
uint32_t mysqlx_column_get_count (mysqlx_result_t *res)
 Get the number of columns in the result. More...
 
const char * mysqlx_column_get_name (mysqlx_result_t *res, uint32_t pos)
 Get column name. More...
 
const char * mysqlx_column_get_original_name (mysqlx_result_t *res, uint32_t pos)
 Get column original name. More...
 
const char * mysqlx_column_get_table (mysqlx_result_t *res, uint32_t pos)
 Get column's table name. More...
 
const char * mysqlx_column_get_original_table (mysqlx_result_t *res, uint32_t pos)
 Get column's original table name. More...
 
const char * mysqlx_column_get_schema (mysqlx_result_t *res, uint32_t pos)
 Get column's schema name. More...
 
const char * mysqlx_column_get_catalog (mysqlx_result_t *res, uint32_t pos)
 Get column's catalog name. More...
 

Detailed Description

Function Documentation

◆ mysqlx_column_get_type()

uint16_t mysqlx_column_get_type ( mysqlx_result_t res,
uint32_t  pos 
)

Get column type identifier.

Parameters
resresult handle
poszero-based column number
Returns
column type identifier (see mysqlx_data_type_t enum)

◆ mysqlx_column_get_collation()

uint16_t mysqlx_column_get_collation ( mysqlx_result_t res,
uint32_t  pos 
)

Get column collation number.

Parameters
resresult handle
poszero-based column number
Returns
column collation number. The number matches the ID in the INFORMATION_SCHEMA.COLLATIONS table.
See also
https://dev.mysql.com/doc/mysql/en/collations-table.html

◆ mysqlx_column_get_length()

uint32_t mysqlx_column_get_length ( mysqlx_result_t res,
uint32_t  pos 
)

Get column length.

Parameters
resresult handle
poszero-based column number
Returns
maximum length of data in the column in bytes as reported by server.
Note
because the column length is returned as byte length it could be confusing with the multi-byte charsets. For instance with UTF8MB4 the length of VARCHAR(100) column is returned as 400 because each character is 4 bytes long.

◆ mysqlx_column_get_precision()

uint16_t mysqlx_column_get_precision ( mysqlx_result_t res,
uint32_t  pos 
)

Get column precision.

Parameters
resresult handle
poszero-based column number
Returns
number of digits after the decimal point

◆ mysqlx_column_get_count()

uint32_t mysqlx_column_get_count ( mysqlx_result_t res)

Get the number of columns in the result.

Parameters
resresult handle
Returns
the number of columns in the result
Note
If the result does not contain rows, 0 columns are reported.
For a result with multiple result sets, the number of columns for the current result set is reported (see mysqlx_next_result()).

◆ mysqlx_column_get_name()

const char * mysqlx_column_get_name ( mysqlx_result_t res,
uint32_t  pos 
)

Get column name.

Parameters
resresult handle
poszero-based column number
Returns
character string containing the column name

◆ mysqlx_column_get_original_name()

const char * mysqlx_column_get_original_name ( mysqlx_result_t res,
uint32_t  pos 
)

Get column original name.

Parameters
resresult handle
poszero-based column number
Returns
character string containing the column original name

◆ mysqlx_column_get_table()

const char * mysqlx_column_get_table ( mysqlx_result_t res,
uint32_t  pos 
)

Get column's table name.

Parameters
resresult handle
poszero-based column number
Returns
character string containing the column table name

◆ mysqlx_column_get_original_table()

const char * mysqlx_column_get_original_table ( mysqlx_result_t res,
uint32_t  pos 
)

Get column's original table name.

Parameters
resresult handle
poszero-based column number
Returns
character string containing the column original table

◆ mysqlx_column_get_schema()

const char * mysqlx_column_get_schema ( mysqlx_result_t res,
uint32_t  pos 
)

Get column's schema name.

Parameters
resresult handle
poszero-based column number
Returns
character string containing the column schema

◆ mysqlx_column_get_catalog()

const char * mysqlx_column_get_catalog ( mysqlx_result_t res,
uint32_t  pos 
)

Get column's catalog name.

Parameters
resresult handle
poszero-based column number
Returns
character string containing the column name