Skip to content
Snippets Groups Projects
Commit dcb5289a authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Document box.tuple.new().

parent a5e78113
No related merge requests found
...@@ -908,11 +908,11 @@ localhost> lua box.counter.dec(0, 'top.mail.ru') ...@@ -908,11 +908,11 @@ localhost> lua box.counter.dec(0, 'top.mail.ru')
<variablelist> <variablelist>
<title>Package <code xml:id="box.tuple" xreflabel="box.tuple">box.tuple</code></title> <title>Package <code xml:id="box.tuple" xreflabel="box.tuple">box.tuple</code></title>
<para>The package contains no functions, but stands for <para>The package stands for <code>box.tuple</code> userdata
<code>box.tuple</code> userdata type. It is possible to access individual type. It is possible to access individual tuple fields using
tuple fields using an index, select a range of fields, iterate an index, select a range of fields, iterate over all fields in
over all fields in a tuple or convert a tuple to a Lua table. a tuple or convert a tuple to a Lua table. Tuples are
Tuples are immutable.</para> immutable.</para>
<varlistentry> <varlistentry>
<term><emphasis role="lua"> </emphasis></term> <term><emphasis role="lua"> </emphasis></term>
<listitem><para> <listitem><para>
...@@ -1000,6 +1000,19 @@ localhost> lua t:find(1, 'abc') ...@@ -1000,6 +1000,19 @@ localhost> lua t:find(1, 'abc')
</para></listitem> </para></listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><emphasis role="lua">box.tuple.new(...)</emphasis></term>
<listitem><para>
Construct a new tuple from a Lua table or a scalar.
</para>
<bridgehead renderas="sect4">Example</bridgehead>
<programlisting>localhost> lua box.tuple.new({tonumber64('18446744073709551615'), 'string', 1})
---
- 18446744073709551615: {'string', 1}
...
</programlisting>
</listitem>
</varlistentry>
</variablelist> </variablelist>
<variablelist> <variablelist>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment