box.tuple.new()
-
box.tuple.
new
(value)¶ Construct a new tuple from either a scalar or a Lua table. Alternatively, one can get new tuples from Tarantool’s select or insert or replace or update requests, which can be regarded as statements that do
new()
implicitly.Parameters: - value (
lua-value
) – the value that will become the tuple contents.
Return: a new tuple
Rtype: tuple
In the following example,
x
will be a new table object containing one tuple andt
will be a new tuple object. Sayingt
returns the entire tuplet
.Example:
tarantool> x = box.space.tester:insert{ > 33, > tonumber('1'), > tonumber64('2') > }:totable() --- ... tarantool> t = box.tuple.new{'abc', 'def', 'ghi', 'abc'} --- ... tarantool> t --- - ['abc', 'def', 'ghi', 'abc'] ...
- value (