From dcb5289aaba0036e8e7b7b4cb4f8e92b9d0cc753 Mon Sep 17 00:00:00 2001 From: Konstantin Osipov <kostja@tarantool.org> Date: Fri, 8 Feb 2013 16:51:14 +0400 Subject: [PATCH] Document box.tuple.new(). --- doc/user/stored-procedures.xml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/doc/user/stored-procedures.xml b/doc/user/stored-procedures.xml index 9f95b4d547..34f1c14068 100644 --- a/doc/user/stored-procedures.xml +++ b/doc/user/stored-procedures.xml @@ -908,11 +908,11 @@ localhost> lua box.counter.dec(0, 'top.mail.ru') <variablelist> <title>Package <code xml:id="box.tuple" xreflabel="box.tuple">box.tuple</code></title> - <para>The package contains no functions, but stands for - <code>box.tuple</code> userdata type. It is possible to access individual - tuple fields using an index, select a range of fields, iterate - over all fields in a tuple or convert a tuple to a Lua table. - Tuples are immutable.</para> + <para>The package stands for <code>box.tuple</code> userdata + type. It is possible to access individual tuple fields using + an index, select a range of fields, iterate over all fields in + a tuple or convert a tuple to a Lua table. Tuples are + immutable.</para> <varlistentry> <term><emphasis role="lua"> </emphasis></term> <listitem><para> @@ -1000,6 +1000,19 @@ localhost> lua t:find(1, 'abc') </para></listitem> </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> -- GitLab