C API  19.3.0
Oracle NoSQL Database C Client
Statement result

Functions

kv_int_t kv_statement_result_get_plan_id (const kv_statement_result_t *result)
 Returns the administrative plan id for this operation if the operation was a create or remove table, a create or remove index, or an alter table. More...
 
const char * kv_statement_result_get_error_message (const kv_statement_result_t *result)
 Returns a description of the problem if the execution is failed. More...
 
const char * kv_statement_result_get_info (const kv_statement_result_t *result)
 Returns detailed information about the execution of the statement in human readable form. More...
 
const char * kv_statement_result_get_info_as_json (const kv_statement_result_t *result)
 Returns detailed information about the execution of the statement in JSON format. More...
 
const char * kv_statement_result_get_result (const kv_statement_result_t *result)
 Returns a text result if the statement result is text and the operation was successful, otherwise returns NULL. More...
 
kv_boolean_t kv_statement_result_is_successful (const kv_statement_result_t *result)
 Identifies if the statement has finished and was successful. More...
 
kv_boolean_t kv_statement_result_is_cancelled (const kv_statement_result_t *result)
 Identifies if the statement has been cancelled, this is the equivalent of kv_future_is_cancelled(). More...
 
kv_boolean_t kv_statement_result_is_done (const kv_statement_result_t *result)
 Identifies if the statement has finished, this is the equivalent of kv_future_is_done(). More...
 
void kv_release_statement_result (kv_statement_result_t **resultp)
 Releases the resource used by statement result structure. More...
 

Detailed Description

A Statement result provides information about the execution and outcome of a table statement. If obtained via kv_future_get_timeout() or kv_future_update_status(), it can represent information about either a completed or in progress operation. If obtained via kv_future_get() or kv_table_execute_sync(), it represents the final status of a finished operation.

Function Documentation

void kv_release_statement_result ( kv_statement_result_t **  resultp)

Releases the resource used by statement result structure.

Parameters
[in]resultpThe pointer of the statement result handle to release.
const char* kv_statement_result_get_error_message ( const kv_statement_result_t result)

Returns a description of the problem if the execution is failed.

Parameters
[in]resultThe statement result handle
Returns
The error message if execution is failed, or return NULL if the execution is successful.
const char* kv_statement_result_get_info ( const kv_statement_result_t result)

Returns detailed information about the execution of the statement in human readable form.

If the statement was a data definition command, the information will include details about the server side execution of the operations. If it was a statement that returns a text result, and the operation was successful, the information will be simple status.

Parameters
[in]resultThe statement result handle
Returns
The information about the execution.
const char* kv_statement_result_get_info_as_json ( const kv_statement_result_t result)

Returns detailed information about the execution of the statement in JSON format.

Parameters
[in]resultThe statement result handle
Returns
The information about the execution.
kv_int_t kv_statement_result_get_plan_id ( const kv_statement_result_t result)

Returns the administrative plan id for this operation if the operation was a create or remove table, a create or remove index, or an alter table.

When using the Admin CLI (runadmin) utility, administrative operations are identified by plan id. The plan id can be used to correlate data definition and administrative statements issued programmatically using the API against operations viewed via the interactive Admin CLI or other monitoring tool.

Parameters
[in]resultThe statement result handle
Returns
The plan id. The plan id will be 0 if this statement was not an administrative command, or did not require execution.
const char* kv_statement_result_get_result ( const kv_statement_result_t result)

Returns a text result if the statement result is text and the operation was successful, otherwise returns NULL.

Parameters
[in]resultThe statement result handle
Returns
The statement result.
kv_boolean_t kv_statement_result_is_cancelled ( const kv_statement_result_t result)

Identifies if the statement has been cancelled, this is the equivalent of kv_future_is_cancelled().

Parameters
[in]resultThe statement result handle
Returns
KV_TRUE if statement has finished and was cancelled, otherwise return KV_FALSE.
kv_boolean_t kv_statement_result_is_done ( const kv_statement_result_t result)

Identifies if the statement has finished, this is the equivalent of kv_future_is_done().

Parameters
[in]resultThe statement result handle
Returns
KV_TRUE if statement has finished, otherwise return KV_FALSE.
kv_boolean_t kv_statement_result_is_successful ( const kv_statement_result_t result)

Identifies if the statement has finished and was successful.

Parameters
[in]resultThe statement result handle
Returns
KV_TRUE if statement has finished successfully, otherwise return KV_FALSE.