diff --git a/src/box/tuple.h b/src/box/tuple.h index 9e1e44e1bae13a2466e44e8bd19137a4cb4f0876..4a0355ea205ebabfd5c7b52708ac096e095589ae 100644 --- a/src/box/tuple.h +++ b/src/box/tuple.h @@ -238,6 +238,16 @@ box_tuple_seek(box_tuple_iterator_t *it, uint32_t fieldno); const char * box_tuple_next(box_tuple_iterator_t *it); +/** + * Extract key from tuple according to key definition of given index. + * Returned buffer is allocated on box_txn_alloc() with this key. + * This function has O(n) complexity, where n is the number of key parts. + * @param tuple tuple from which need to extract key + * @param space_id space identifier + * @param index_id index identifier + * @retval not NULL Success + * @retval NULL Memory allocation error + */ char * box_tuple_extract_key(const box_tuple_t *tuple, uint32_t space_id, uint32_t index_id, uint32_t *key_size);