@@ -85,20 +85,21 @@ Code: 0x01.
85
85
See :ref: `space_object:select() <box_space-select >`.
86
86
The body is a 6-item map.
87
87
88
- .. image :: images/select.svg
88
+ .. raw :: html
89
+ :file: images/select.svg
89
90
90
91
Example
91
92
~~~~~~~
92
93
93
94
If the id of 'tspace' is 512 and this is the fifth message, |br |
94
95
:samp: `{ conn } . `:code: `space.tspace:select({0},{iterator='GT',offset=1,limit=2}) ` will cause:
95
96
96
- .. image :: images/select_example.svg
97
+ .. raw :: html
98
+ :file: images/select_example.svg
97
99
98
100
In the :ref: `examples <box_protocol-illustration >`,
99
101
you can find actual byte codes of an IPROTO_SELECT message.
100
102
101
-
102
103
.. _box_protocol-insert :
103
104
104
105
IPROTO_INSERT
@@ -109,7 +110,8 @@ Code: 0x02.
109
110
See :ref: `space_object:insert() <box_space-insert >`.
110
111
The body is a 2-item map:
111
112
112
- .. image :: images/insert.svg
113
+ .. raw :: html
114
+ :file: images/insert.svg
113
115
114
116
For example, if the request is
115
117
:samp: `INSERT INTO { table-name } VALUES (1), (2), (3) `, then the response body
@@ -123,7 +125,8 @@ Example
123
125
If the id of 'tspace' is 512 and this is the fifth message, |br |
124
126
:samp: `{ conn } . `:code: `space.tspace:insert{1, 'AAA'} ` will produce the following request and response packets:
125
127
126
- .. image :: images/insert_example.svg
128
+ .. raw :: html
129
+ :file: images/insert_example.svg
127
130
128
131
The tutorial :ref: `Understanding the binary protocol <box_protocol-illustration >`
129
132
shows actual byte codes of the response to the IPROTO_INSERT message.
@@ -138,7 +141,8 @@ Code: 0x03.
138
141
See :ref: `space_object:replace() <box_space-replace >`.
139
142
The body is a 2-item map, the same as for IPROTO_INSERT:
140
143
141
- .. image :: images/replace.svg
144
+ .. raw :: html
145
+ :file: images/replace.svg
142
146
143
147
.. _box_protocol-update :
144
148
@@ -151,29 +155,34 @@ See :ref:`space_object:update() <box_space-update>`.
151
155
152
156
The body is usually a 4-item map:
153
157
154
- .. image :: images/update.svg
158
+ .. raw :: html
159
+ :file: images/update.svg
155
160
156
161
Examples
157
162
~~~~~~~~
158
163
159
164
If the operation specifies no values, then IPROTO_TUPLE is a 2-item array:
160
165
161
- .. image :: images/update_example_0.svg
166
+ .. raw :: html
167
+ :file: images/update_example_0.svg
162
168
163
169
Normally field numbers start with 1.
164
170
165
171
If the operation specifies one value, then IPROTO_TUPLE is a 3-item array:
166
172
167
- .. image :: images/update_example_1.svg
173
+ .. raw :: html
174
+ :file: images/update_example_1.svg
168
175
169
176
Otherwise IPROTO_TUPLE is a 5-item array:
170
177
171
- .. image :: images/update_example_regular.svg
178
+ .. raw :: html
179
+ :file: images/update_example_regular.svg
172
180
173
181
If the id of 'tspace' is 512 and this is the fifth message, |br |
174
182
:samp: `{ conn } . `:code: `space.tspace:update(999, {{'=', 2, 'B'}}) ` will cause:
175
183
176
- .. image :: images/update_example.svg
184
+ .. raw :: html
185
+ :file: images/update_example.svg
177
186
178
187
The map item IPROTO_INDEX_BASE is optional.
179
188
@@ -192,7 +201,8 @@ See :ref:`space_object:upsert() <box_space-upsert>`.
192
201
193
202
The body is usually a 4-item map:
194
203
195
- .. image :: images/upsert.svg
204
+ .. raw :: html
205
+ :file: images/upsert.svg
196
206
197
207
IPROTO_OPS is the array of operations. It is the same as the IPROTO_TUPLE of :ref: `IPROTO_UPDATE <box_protocol-update >`.
198
208
@@ -208,7 +218,8 @@ Code: 0x05.
208
218
See :ref: `space_object:delete() <box_space-delete >`.
209
219
The body is a 3-item map:
210
220
211
- .. image :: images/delete.svg
221
+ .. raw :: html
222
+ :file: images/delete.svg
212
223
213
224
.. _box_protocol-eval :
214
225
@@ -230,7 +241,8 @@ makes extensive use of ``eval``.
230
241
231
242
The body is a 2-item map:
232
243
233
- .. image :: images/eval.svg
244
+ .. raw :: html
245
+ :file: images/eval.svg
234
246
235
247
* For :ref: `IPROTO_EVAL <box_protocol-eval >` and :ref: `IPROTO_CALL <box_protocol-call >`
236
248
the response body will usually be an array but, since Lua requests can result in a wide variety
@@ -246,7 +258,8 @@ Example
246
258
247
259
If this is the fifth message, :samp: `conn:eval('return 5;') ` will cause:
248
260
249
- .. image :: images/eval_example.svg
261
+ .. raw :: html
262
+ :file: images/eval_example.svg
250
263
251
264
.. _box_protocol-call :
252
265
@@ -263,7 +276,8 @@ and superseded by IPROTO_CALL.
263
276
The body is a 2-item map. The response will be a list of values, similar to the
264
277
:ref: `IPROTO_EVAL <box_protocol-eval >` response. The return from conn:call is whatever the function returns.
265
278
266
- .. image :: images/call.svg
279
+ .. raw :: html
280
+ :file: images/call.svg
267
281
268
282
.. note ::
269
283
@@ -284,7 +298,8 @@ see the :ref:`Authentication <box_protocol-authentication>` section of this docu
284
298
285
299
The client sends an authentication packet as an IPROTO_AUTH message:
286
300
287
- .. image :: images/auth.svg
301
+ .. raw :: html
302
+ :file: images/auth.svg
288
303
289
304
IPROTO_USERNAME holds the user name. IPROTO_TUPLE must be an array of 2 fields:
290
305
authentication mechanism ("chap-sha1" is the only supported mechanism right now)
@@ -321,7 +336,8 @@ Code: 0x40.
321
336
See :ref: `conn:ping() <conn-ping >`. The body will be an empty map because IPROTO_PING
322
337
in the header contains all the information that the server instance needs.
323
338
324
- .. image :: images/ping.svg
339
+ .. raw :: html
340
+ :file: images/ping.svg
325
341
326
342
.. _box_protocol-id :
327
343
@@ -336,7 +352,8 @@ disable certain features in interacting with these clients.
336
352
337
353
The body is a 2-item map:
338
354
339
- .. image :: images/id.svg
355
+ .. raw :: html
356
+ :file: images/id.svg
340
357
341
358
The response body has the same structure as
342
359
the request body. It informs the client about the protocol version and features
0 commit comments