Skip to content

Clarify link between number and cdata #3050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions doc/book/box/data_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -150,6 +150,10 @@ Lua versus MsgPack
- integer
- `number`_
- ``12345``
* - scalar
- integer
- `cdata`_
- ``12345``
* - scalar
- float64 (double)
- `number`_
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -437,7 +444,8 @@ Full information is in section
- TREE or HASH
* - ``'number'``
- :ref:`number <index-box_number>`, which may include
:ref:`integer <index-box_integer>` or :ref:`double <index-box_double>` values
:ref:`integer <index-box_integer>`, :ref:`double <index-box_double>`,
or :ref:`decimal <index-box_decimal>` values
- TREE or HASH
* - ``'decimal'``
- :ref:`decimal <index-box_decimal>`
Expand Down
4 changes: 2 additions & 2 deletions locale/ru/LC_MESSAGES/book/box/data_model.po
Original file line number Diff line number Diff line change
Expand Up @@ -711,10 +711,10 @@ msgstr "``'number'``"

msgid ""
":ref:`number <index-box_number>`, which may include :ref:`integer <index-"
"box_integer>` or :ref:`double <index-box_double>` values"
"box_integer>`, :ref:`double <index-box_double>`, or :ref:`decimal <index-box_decimal>` values"
msgstr ""
":ref:`number <index-box_number>`, может включать в себя значения типа "
":ref:`integer <index-box_integer>` или :ref:`double <index-box_double>`"
":ref:`integer <index-box_integer>`, :ref:`double <index-box_double>` или :ref:`decimal <index-box_decimal>`"

msgid "``'decimal'``"
msgstr "``'decimal'``"
Expand Down