From 6833e7004250eb2206a4099b19163a04e6fbbc73 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk <roman@tsisyk.com> Date: Wed, 12 Jul 2017 19:08:10 +0300 Subject: [PATCH] Add comments to box_tuple_extract_key() Closes #2535 --- src/box/tuple.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/box/tuple.h b/src/box/tuple.h index 9e1e44e1ba..4a0355ea20 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); -- GitLab