From 3a72ea80bed690c6e42894bd078f98a9be79ec2a Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Fri, 12 Aug 2022 11:29:46 +0300 Subject: [PATCH 1/3] Clarify nil data type --- doc/book/box/data_model.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/book/box/data_model.rst b/doc/book/box/data_model.rst index b2884aeff7..39942ef16f 100644 --- a/doc/book/box/data_model.rst +++ b/doc/book/box/data_model.rst @@ -134,10 +134,6 @@ Lua versus MsgPack - MsgPack type - Lua type - Example value - * - scalar - - nil - - `nil`_ - - ``nil`` * - scalar - boolean - `boolean`_ @@ -183,7 +179,7 @@ Lua versus MsgPack - `cdata`_ - ``12a34b5c-de67-8f90-123g-h4567ab8901`` * - scalar - - msgpack.NULL + - nil - `cdata`_ - :ref:`box.NULL ` * - compound @@ -199,18 +195,22 @@ Lua versus MsgPack - tuple (`cdata`_) - ``[12345, 'A B C']`` +.. _boolean: http://www.lua.org/pil/2.2.html +.. _string: http://www.lua.org/pil/2.4.html +.. _number: http://www.lua.org/pil/2.3.html +.. _table: http://www.lua.org/pil/2.5.html +.. _cdata: http://luajit.org/ext_ffi.html#call + .. note:: MsgPack values have variable lengths. So, for example, the smallest number requires only one byte, but the largest number requires nine bytes. -.. _nil: http://www.lua.org/pil/2.1.html -.. _boolean: http://www.lua.org/pil/2.2.html -.. _string: http://www.lua.org/pil/2.4.html -.. _number: http://www.lua.org/pil/2.3.html -.. _table: http://www.lua.org/pil/2.5.html -.. _cdata: http://luajit.org/ext_ffi.html#call +.. note:: + + The Lua `nil `_ type is encoded as MsgPack ``nil`` but + decoded as ``msgpack.NULL``. For this reason, Tarantool uses a special constant, :ref:`box.NULL `. .. _index_box_field_type_details: From e9059913ff661b7e05e543346e7492cf82baafc5 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Fri, 12 Aug 2022 12:05:08 +0300 Subject: [PATCH 2/3] Apply suggestions after review --- 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 39942ef16f..c7953f87e8 100644 --- a/doc/book/box/data_model.rst +++ b/doc/book/box/data_model.rst @@ -210,7 +210,7 @@ Lua versus MsgPack .. note:: The Lua `nil `_ type is encoded as MsgPack ``nil`` but - decoded as ``msgpack.NULL``. For this reason, Tarantool uses a special constant, :ref:`box.NULL `. + decoded as :ref:`msgpack.NULL `. .. _index_box_field_type_details: From 4de37ce7a94e9d55534cd109b6eea8e7c5cbf109 Mon Sep 17 00:00:00 2001 From: Patience Daur Date: Mon, 15 Aug 2022 14:26:54 +0300 Subject: [PATCH 3/3] Move row back to top of table --- doc/book/box/data_model.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/book/box/data_model.rst b/doc/book/box/data_model.rst index c7953f87e8..622025b9d4 100644 --- a/doc/book/box/data_model.rst +++ b/doc/book/box/data_model.rst @@ -134,6 +134,10 @@ Lua versus MsgPack - MsgPack type - Lua type - Example value + * - scalar + - nil + - `cdata`_ + - :ref:`box.NULL ` * - scalar - boolean - `boolean`_ @@ -178,10 +182,6 @@ Lua versus MsgPack - ext (for Tarantool ``uuid``) - `cdata`_ - ``12a34b5c-de67-8f90-123g-h4567ab8901`` - * - scalar - - nil - - `cdata`_ - - :ref:`box.NULL ` * - compound - map - `table`_ (with string keys)