From 8f047c70b875bf93f756566af2e06406faa5e2f2 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Sat, 23 Jul 2022 08:46:23 +0300 Subject: [PATCH 1/3] Clarify the connection between number and cdata --- doc/book/box/data_model.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/book/box/data_model.rst b/doc/book/box/data_model.rst index d60ac9a916..73d1177269 100644 --- a/doc/book/box/data_model.rst +++ b/doc/book/box/data_model.rst @@ -150,6 +150,10 @@ Lua versus MsgPack - integer - `number`_ - ``12345`` + * - scalar + - integer + - `cdata`_ + - ``12345`` * - scalar - float64 (double) - `number`_ @@ -291,6 +295,9 @@ Here are examples of numbers using regular notation, exponential notation, the ULL suffix and the ``tonumber64`` function: ``-55``, ``-2.7e+20``, ``100000000000000ULL``, ``tonumber64('18446744073709551615')``. +You can also use the ``ffi`` module to specify a C type to cast the number to. +In this case, the number will be stored as `cdata`_. + .. _index-box_decimal: **decimal**. The Tarantool decimal type is stored as a MsgPack ext (Extension). From 6d4af5e41a6c897a8119dbcf17fa6d816a49547d Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Sat, 23 Jul 2022 08:47:59 +0300 Subject: [PATCH 2/3] Adjust table widths --- doc/book/box/data_model.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/book/box/data_model.rst b/doc/book/box/data_model.rst index 73d1177269..aab8c88906 100644 --- a/doc/book/box/data_model.rst +++ b/doc/book/box/data_model.rst @@ -127,7 +127,7 @@ Lua versus MsgPack .. container:: table .. list-table:: - :widths: 15 20 30 35 + :widths: 15 30 15 40 :header-rows: 1 * - Scalar / compound From a7bb75de81d0d03da1a76da7ba1304ac1e1e4b05 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Sat, 23 Jul 2022 08:54:54 +0300 Subject: [PATCH 3/3] Mention decimal among number field index types Resolves #3049 --- doc/book/box/data_model.rst | 3 ++- locale/ru/LC_MESSAGES/book/box/data_model.po | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/book/box/data_model.rst b/doc/book/box/data_model.rst index aab8c88906..cf9d90153c 100644 --- a/doc/book/box/data_model.rst +++ b/doc/book/box/data_model.rst @@ -444,7 +444,8 @@ Full information is in section - TREE or HASH * - ``'number'`` - :ref:`number `, which may include - :ref:`integer ` or :ref:`double ` values + :ref:`integer `, :ref:`double `, + or :ref:`decimal ` values - TREE or HASH * - ``'decimal'`` - :ref:`decimal ` diff --git a/locale/ru/LC_MESSAGES/book/box/data_model.po b/locale/ru/LC_MESSAGES/book/box/data_model.po index 8881209d83..8348f9a958 100644 --- a/locale/ru/LC_MESSAGES/book/box/data_model.po +++ b/locale/ru/LC_MESSAGES/book/box/data_model.po @@ -711,10 +711,10 @@ msgstr "``'number'``" msgid "" ":ref:`number `, which may include :ref:`integer ` or :ref:`double ` values" +"box_integer>`, :ref:`double `, or :ref:`decimal ` values" msgstr "" ":ref:`number `, может включать в себя значения типа " -":ref:`integer ` или :ref:`double `" +":ref:`integer `, :ref:`double ` или :ref:`decimal `" msgid "``'decimal'``" msgstr "``'decimal'``"