@@ -47,8 +47,9 @@ MsgPack data types:
47
47
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
48
Encoding of non default types in Tarantool
49
49
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
- .. надо что-то написать в начале (((
51
- Introduction to submodule.
50
+
51
+ Some data types used in our database do not correspond to any type of message
52
+ from MsgPack. For these data types, we use the following representation.
52
53
53
54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
54
55
Decimals
@@ -61,8 +62,8 @@ MP_DECIMAL is 1.
61
62
62
63
`MsgPack spec <https://github.com/msgpack/msgpack/blob/master/spec.md#ext-format-family >`_
63
64
defines ``fixext 1/2/4/8/16 `` and ``ext 8/16/32 `` types. ``fixext ``
64
- types have fixed length, so it is not encoded explicitly, while ``ext `` types require
65
- to encode a data length. MP_EXP + optional length meant usage of one of those types.
65
+ types have fixed length so it is not encoded explicitly, while ``ext `` types require
66
+ the data length to be encoded. `` MP_EXP `` + optional `` length `` meant usage of one of those types.
66
67
67
68
The decimal MsgPack representation looks like this:
68
69
@@ -73,7 +74,7 @@ The decimal MsgPack representation looks like this:
73
74
+--------+-------------------+------------+===============+
74
75
75
76
Here ``length `` is the length of PackedDecimal field, and it is of type
76
- ``MP_UINT ``, when encoded explicitly (i.e. when type is ext 8/16/32).
77
+ ``MP_UINT ``, when encoded explicitly (i.e. when type is `` ext 8/16/32 `` ).
77
78
78
79
PackedDecimal has the following structure:
79
80
@@ -93,11 +94,11 @@ so ``byte >> 4`` is the first digit and ``byte & 0x0f`` is the second digit.
93
94
The leftmost digit in the array is the most significant.
94
95
The rightmost digit in the array is the least significant.
95
96
96
- The first byte in the BCD array may have only the second digit.
97
- The last byte in the BCD array has only the first digit and a ``nibble ``.
97
+ The first byte in the BCD array may have only second digit.
98
+ The last byte in the BCD array has only first digit and a ``nibble ``.
98
99
99
100
The ``nibble `` represents the number's sign. ``0x0a ``, ``0x0c ``, ``0x0e ``, ``0x0f ``
100
- stand for plus, ``0x0b ``, ``0x0d `` stand for minus.
101
+ stand for plus, ``0x0b `` and ``0x0d `` stand for minus.
101
102
102
103
**Example **
103
104
0 commit comments