@@ -7,10 +7,11 @@ MessagePack extensions
7
7
----------------------------
8
8
9
9
Tarantool uses predefined MessagePack extension types to represent some
10
- of the special values. Extension types include ``MP_DECIMAL ``, ``MP_UUID ``
11
- and ``MP_ERROR ``. These types require special attention from the connector
12
- developers, as they must be treated separately from the default MessagePack
13
- types, and correctly mapped to programming language types.
10
+ of the special values. Extension types include ``MP_DECIMAL ``, ``MP_UUID ``,
11
+ ``MP_ERROR ``, ``MP_DATETIME ``, and ``MP_INTERVAL ``.
12
+ These types require special attention from the connector developers,
13
+ as they must be treated separately from the default MessagePack types,
14
+ and correctly mapped to programming language types.
14
15
15
16
*******************************
16
17
The DECIMAL type
@@ -19,7 +20,7 @@ The DECIMAL type
19
20
The MessagePack EXT type ``MP_EXT `` together with the extension type
20
21
``MP_DECIMAL `` is a header for values of the DECIMAL type.
21
22
22
- MP_DECIMAL is 1.
23
+ `` MP_DECIMAL `` is 1.
23
24
24
25
`MessagePack spec <https://github.com/msgpack/msgpack/blob/master/spec.md >`_
25
26
defines two kinds of types:
@@ -107,7 +108,7 @@ The UUID type
107
108
The MessagePack EXT type ``MP_EXT `` together with the extension type
108
109
``MP_UUID `` for values of the UUID type. Since version :doc: `2.4.1 </release/2.4.1 >`.
109
110
110
- MP_UUID is 2.
111
+ `` MP_UUID `` is 2.
111
112
112
113
The `MessagePack spec <https://github.com/msgpack/msgpack/blob/master/spec.md >`_
113
114
defines ``d8 `` to mean fixext with size 16, and a uuid's size is always 16.
@@ -233,3 +234,41 @@ the server response will look like this:
233
234
00 MP_UINT = error number
234
235
05 MP_ERROR_ERRCODE
235
236
0a MP_UINT = eror code ER_SPACE_EXISTS
237
+
238
+
239
+ .. _msgpack_ext-datetime :
240
+
241
+ **********************************
242
+ The DATETIME type
243
+ **********************************
244
+
245
+ Since version :doc: `2.10.0 </release/2.10.0 >`.
246
+ ``MP_DATETIME `` is 4.
247
+
248
+ The datetime MessagePack representation looks like this:
249
+
250
+ .. code-block :: none
251
+
252
+ +--------+-------------------+------------+===============+
253
+ | MP_EXT | length (optional) | MP_DECIMAL | PackedDecimal |
254
+ +--------+-------------------+------------+===============+
255
+
256
+ .. _msgpack_ext-interval :
257
+
258
+ **********************************
259
+ The INTERVAL type
260
+ **********************************
261
+
262
+ The MessagePack EXT type ``MP_EXT `` together with the extension type
263
+ ``MP_INTERVAL `` is a header for values of the INTERVAL type.
264
+ Since version :doc: `2.10.0 </release/2.10.0 >`.
265
+
266
+ ``MP_INTERVAL `` is 6.
267
+
268
+ The interval MessagePack representation looks like this:
269
+
270
+ .. code-block :: none
271
+
272
+ +--------+-------------------+------------+===============+
273
+ | MP_EXT | length (optional) | MP_INTERVAL | PackedDecimal |
274
+ +--------+-------------------+------------+===============+
0 commit comments