Hi! Thanks for the patch!
On 27/09/2018 20:55, AlexeyIvushkin wrote:
From: Morgan-iv <ivushkinalex@xxxxxxxxx>
When operating with tuples, we only have tuple:bsize function
to get size of tuple. tuple:bsize returns only size of MessagePack
part of struct tuple, without tuple_meta. New function tuple:size
returns size of all tuple, with MessagePack and tuple_meta
Closes #2256
---
https://github.com/tarantool/tarantool/issues/2256
https://github.com/tarantool/tarantool/tree/Morgan-iv/gh-2256
src/box/lua/tuple.c | 10 ++++++++++
src/box/lua/tuple.lua | 1 +
test/box/tuple.result | 12 ++++++++++++
test/box/tuple.test.lua | 6 ++++++
4 files changed, 29 insertions(+)
diff --git a/test/box/tuple.result b/test/box/tuple.result
index e035cb9..418f5f8 100644
--- a/test/box/tuple.result
+++ b/test/box/tuple.result
@@ -186,6 +186,18 @@ t:bsize()
---
- 5
...
+-- tuple:size()
+t = box.tuple.new('abc')
+---
+...
+t
+---
+- ['abc']
+...
+t:size()
+---
+- 15
+...
--
-- Test cases for #106 box.tuple.new fails on multiple items
--