Tarantool CE/EE Documentation portal logo
Support
Updated at July 17, 2026   02:08 PM

box.tuple.new()

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.

Returns

a new tuple

Return type

tuple

In the following example, x will be a new table object containing one tuple and t will be a new tuple object. Saying t returns the entire tuple t.

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']...