The result structure contains return information for a single row returned by a data access function. The information available depends on parameters supplied for the operation and may include table name, row, version, previous row, previous row version, index key and success information. The following describes what is available and when:
- kv_table_put(), kv_table_put_if_*(): the result may contain version, previous row, previous row version.
- kv_table_delete(), kv_table_delete_if_version(): the result may contain previous row, previous row version.
- iterator created by kv_table_multi_get() and kv_table_iterator(): the result may contain table_name and row. If keyonly is FALSE, the row will be complete, if TRUE it will only have primary key field data.
- iterator created by kv_index_iterator(): the result may contain table_name and row. If keyonly is FALSE, the row will be complete, if TRUE it will only have primary key and index key data.
- results from execution of grouped operations have the same information as their corresponding operations above.
Copies a version structure.
- Parameters
-
[in] | from | The version structure to be copied. |
[in] | to | The output version structure, it should be released using kv_release_version(). |
Releases the resources used by the result handle.
- Parameters
-
[in] | resultp | The pointer to the result handle to release. |
Releases the resources used by the version structure.
- Parameters
-
[in] | versionp | The pointer to the version handle to release. |
Returns the expiration time of current row from the result handle.
- Parameters
-
[in] | result | The result handle. |
- Returns
- The expiration time of current row, or an error code (a negative number) if result is NULL.
Returns the index key from the result handle.
- Note
- The returned index key handle is owned by result handle and released implicitly when it is released.
- Parameters
-
[in] | result | The result handle. |
- Returns
- the index key handle, or NULL if it is not available.
Returns the previous row from the result handle.
- Note
- The returned previous row handle is owned by result handle and released implicitly when it is released.
- Parameters
-
[in] | result | The result handle. |
- Returns
- the previous row handle, or NULL if it is not available.
Returns the version of previous row from the result handle.
- Note
- The returned version handle is owned by result handle and released implicitly when it is released.
- Parameters
-
[in] | result | The result handle. |
- Returns
- the previous row version handle, or NULL if it is not available.
Returns the row from the result handle.
- Note
- The returned row handle is owned by result handle and released implicitly when it is released.
- Parameters
-
[in] | result | The result handle. |
- Returns
- the row handle, or NULL if it is not available.
Identifies if the execution of an operation was successfully.
- Parameters
-
[in] | result | The result handle. |
- Returns
- KV_TRUE if the result contains the success information and operation operated successfully, otherwise return KV_FALSE.
const char* kv_result_get_table_name |
( |
const kv_result_t * |
result | ) |
|
Returns the table name from the result handle.
- Parameters
-
[in] | result | The result handle. |
- Returns
- the table name, or NULL if it is not available.
Returns the version from the result handle.
- Note
- The returned version handle is owned by result handle and released implicitly when it is released.
- Parameters
-
[in] | result | The result handle. |
- Returns
- the version handle, or NULL if it is not available.