#include <kvstore.h> kv_error_t kv_result_get_previous_version(const kv_operation_results_t *res, kv_int_t index, const kv_version_t **version)
Returns the value's version that existed before a put operation was
run as a part of multi-step, sequence of operations. A previous
version will only exist if the provided index in the operation
contains a put operation as created by
kv_create_put_with_options_op(), and if that function's
return_info parameter is
KV_RETURN_VALUE_ALL
or
KV_RETURN_VALUE_VERSION
.
If the index parameter is out of
range, this function returns KV_NO_SUCH_OBJECT
.
The res parameter is the operation results list that contains the previous version you want to examine.
The index parameter is the index in the results list which holds the information you want to retrieve.
The version parameter references memory to which is copied the previous version. Release the resources used by this value using kv_release_version().
This parameter will be NULL if the indexed result was not generated by put operation that was configured to return previous versions.