MySQL 8.0.39
Source Code Documentation
s_mysql_mysql_command_query_result Struct Reference

A service that provides the apis for mysql command, store_result, free_result, more_results, next_result, result_metadata and fetch_row. More...

#include <mysql_command_services.h>

Public Attributes

mysql_service_status_t(* store_result )(MYSQL_H mysql, MYSQL_RES_H *mysql_res)
 Calls mysql_store_result api to retrieves a complete result set. More...
 
mysql_service_status_t(* free_result )(MYSQL_RES_H mysql_res)
 Calls mysql_free_result api to frees memory used by a result set. More...
 
mysql_service_status_t(* more_results )(MYSQL_H mysql)
 Calls mysql_more_results api to checks whether any more results exist. More...
 
int(* next_result )(MYSQL_H mysql)
 Calls mysql_next_result api to returns/initiates the next result in multiple-result executions. More...
 
mysql_service_status_t(* result_metadata )(MYSQL_RES_H res_h)
 Calls mysql_result_metadata api to whether a result set has metadata. More...
 
mysql_service_status_t(* fetch_row )(MYSQL_RES_H res_h, char ***row)
 Calls mysql_fetch_row api to fetches the next row from the result set. More...
 
mysql_service_status_t(* fetch_lengths )(MYSQL_RES_H res_h, ulong **length)
 Calls mysql_fetch_lengths api to Returns the lengths of all columns in the current row. More...
 

Detailed Description

A service that provides the apis for mysql command, store_result, free_result, more_results, next_result, result_metadata and fetch_row.

Member Data Documentation

◆ fetch_lengths

mysql_service_status_t(* s_mysql_mysql_command_query_result::fetch_lengths) (MYSQL_RES_H res_h, ulong **length)

Calls mysql_fetch_lengths api to Returns the lengths of all columns in the current row.

Parameters
[in]res_hAn mysql result object to fetch a row from the result set.
[out]*lengthlengths of all columns.
Return values
truefailure
falsesuccess

◆ fetch_row

mysql_service_status_t(* s_mysql_mysql_command_query_result::fetch_row) (MYSQL_RES_H res_h, char ***row)

Calls mysql_fetch_row api to fetches the next row from the result set.

Parameters
[in]res_hAn mysql result object to fetch a row from the result set.
[out]*rowTo store the fetched row with server's charset.
Return values
truefailure
falsesuccess

◆ free_result

mysql_service_status_t(* s_mysql_mysql_command_query_result::free_result) (MYSQL_RES_H mysql_res)

Calls mysql_free_result api to frees memory used by a result set.

Parameters
[in]mysql_resAn mysql result object to free the result set.
Return values
truefailure
falsesuccess

◆ more_results

mysql_service_status_t(* s_mysql_mysql_command_query_result::more_results) (MYSQL_H mysql)

Calls mysql_more_results api to checks whether any more results exist.

Parameters
[in]mysqlA valid mysql object.
Return values
truefailure
falsesuccess

◆ next_result

int(* s_mysql_mysql_command_query_result::next_result) (MYSQL_H mysql)

Calls mysql_next_result api to returns/initiates the next result in multiple-result executions.

Parameters
[in]mysqlA valid mysql object.
Return values
-1no more results
>0error
0if yes more results exits(keep looping)

◆ result_metadata

mysql_service_status_t(* s_mysql_mysql_command_query_result::result_metadata) (MYSQL_RES_H res_h)

Calls mysql_result_metadata api to whether a result set has metadata.

Parameters
[in]res_hAn mysql result object to get the metadata info.
Return values
truefailure metadata_info not present.
falsesuccess metadata_info present.

◆ store_result

mysql_service_status_t(* s_mysql_mysql_command_query_result::store_result) (MYSQL_H mysql, MYSQL_RES_H *mysql_res)

Calls mysql_store_result api to retrieves a complete result set.

Parameters
[in]mysqlA valid mysql object.
[out]*mysql_resAn mysql result object to get the result set.
Return values
truefailure
falsesuccess

The documentation for this struct was generated from the following file: