Skip to content

Commit 99e5291

Browse files
committed
Make images in Client-server and SQL clickable
1 parent 110013e commit 99e5291

File tree

2 files changed

+50
-26
lines changed

2 files changed

+50
-26
lines changed

doc/dev_guide/internals/iproto/requests.rst

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,21 @@ Code: 0x01.
8585
See :ref:`space_object:select() <box_space-select>`.
8686
The body is a 6-item map.
8787

88-
.. image:: images/select.svg
88+
.. raw:: html
89+
:file: images/select.svg
8990

9091
Example
9192
~~~~~~~
9293

9394
If the id of 'tspace' is 512 and this is the fifth message, |br|
9495
:samp:`{conn}.`:code:`space.tspace:select({0},{iterator='GT',offset=1,limit=2})` will cause:
9596

96-
.. image:: images/select_example.svg
97+
.. raw:: html
98+
:file: images/select_example.svg
9799

98100
In the :ref:`examples <box_protocol-illustration>`,
99101
you can find actual byte codes of an IPROTO_SELECT message.
100102

101-
102103
.. _box_protocol-insert:
103104

104105
IPROTO_INSERT
@@ -109,7 +110,8 @@ Code: 0x02.
109110
See :ref:`space_object:insert() <box_space-insert>`.
110111
The body is a 2-item map:
111112

112-
.. image:: images/insert.svg
113+
.. raw:: html
114+
:file: images/insert.svg
113115

114116
For example, if the request is
115117
:samp:`INSERT INTO {table-name} VALUES (1), (2), (3)`, then the response body
@@ -123,7 +125,8 @@ Example
123125
If the id of 'tspace' is 512 and this is the fifth message, |br|
124126
:samp:`{conn}.`:code:`space.tspace:insert{1, 'AAA'}` will produce the following request and response packets:
125127

126-
.. image:: images/insert_example.svg
128+
.. raw:: html
129+
:file: images/insert_example.svg
127130

128131
The tutorial :ref:`Understanding the binary protocol <box_protocol-illustration>`
129132
shows actual byte codes of the response to the IPROTO_INSERT message.
@@ -138,7 +141,8 @@ Code: 0x03.
138141
See :ref:`space_object:replace() <box_space-replace>`.
139142
The body is a 2-item map, the same as for IPROTO_INSERT:
140143

141-
.. image:: images/replace.svg
144+
.. raw:: html
145+
:file: images/replace.svg
142146

143147
.. _box_protocol-update:
144148

@@ -151,29 +155,34 @@ See :ref:`space_object:update() <box_space-update>`.
151155

152156
The body is usually a 4-item map:
153157

154-
.. image:: images/update.svg
158+
.. raw:: html
159+
:file: images/update.svg
155160

156161
Examples
157162
~~~~~~~~
158163

159164
If the operation specifies no values, then IPROTO_TUPLE is a 2-item array:
160165

161-
.. image:: images/update_example_0.svg
166+
.. raw:: html
167+
:file: images/update_example_0.svg
162168

163169
Normally field numbers start with 1.
164170

165171
If the operation specifies one value, then IPROTO_TUPLE is a 3-item array:
166172

167-
.. image:: images/update_example_1.svg
173+
.. raw:: html
174+
:file: images/update_example_1.svg
168175

169176
Otherwise IPROTO_TUPLE is a 5-item array:
170177

171-
.. image:: images/update_example_regular.svg
178+
.. raw:: html
179+
:file: images/update_example_regular.svg
172180

173181
If the id of 'tspace' is 512 and this is the fifth message, |br|
174182
:samp:`{conn}.`:code:`space.tspace:update(999, {{'=', 2, 'B'}})` will cause:
175183

176-
.. image:: images/update_example.svg
184+
.. raw:: html
185+
:file: images/update_example.svg
177186

178187
The map item IPROTO_INDEX_BASE is optional.
179188

@@ -192,7 +201,8 @@ See :ref:`space_object:upsert() <box_space-upsert>`.
192201

193202
The body is usually a 4-item map:
194203

195-
.. image:: images/upsert.svg
204+
.. raw:: html
205+
:file: images/upsert.svg
196206

197207
IPROTO_OPS is the array of operations. It is the same as the IPROTO_TUPLE of :ref:`IPROTO_UPDATE <box_protocol-update>`.
198208

@@ -208,7 +218,8 @@ Code: 0x05.
208218
See :ref:`space_object:delete() <box_space-delete>`.
209219
The body is a 3-item map:
210220

211-
.. image:: images/delete.svg
221+
.. raw:: html
222+
:file: images/delete.svg
212223

213224
.. _box_protocol-eval:
214225

@@ -230,7 +241,8 @@ makes extensive use of ``eval``.
230241

231242
The body is a 2-item map:
232243

233-
.. image:: images/eval.svg
244+
.. raw:: html
245+
:file: images/eval.svg
234246

235247
* For :ref:`IPROTO_EVAL <box_protocol-eval>` and :ref:`IPROTO_CALL <box_protocol-call>`
236248
the response body will usually be an array but, since Lua requests can result in a wide variety
@@ -246,7 +258,8 @@ Example
246258

247259
If this is the fifth message, :samp:`conn:eval('return 5;')` will cause:
248260

249-
.. image:: images/eval_example.svg
261+
.. raw:: html
262+
:file: images/eval_example.svg
250263

251264
.. _box_protocol-call:
252265

@@ -263,7 +276,8 @@ and superseded by IPROTO_CALL.
263276
The body is a 2-item map. The response will be a list of values, similar to the
264277
:ref:`IPROTO_EVAL <box_protocol-eval>` response. The return from conn:call is whatever the function returns.
265278

266-
.. image:: images/call.svg
279+
.. raw:: html
280+
:file: images/call.svg
267281

268282
.. note::
269283

@@ -284,7 +298,8 @@ see the :ref:`Authentication <box_protocol-authentication>` section of this docu
284298

285299
The client sends an authentication packet as an IPROTO_AUTH message:
286300

287-
.. image:: images/auth.svg
301+
.. raw:: html
302+
:file: images/auth.svg
288303

289304
IPROTO_USERNAME holds the user name. IPROTO_TUPLE must be an array of 2 fields:
290305
authentication mechanism ("chap-sha1" is the only supported mechanism right now)
@@ -321,7 +336,8 @@ Code: 0x40.
321336
See :ref:`conn:ping() <conn-ping>`. The body will be an empty map because IPROTO_PING
322337
in the header contains all the information that the server instance needs.
323338

324-
.. image:: images/ping.svg
339+
.. raw:: html
340+
:file: images/ping.svg
325341

326342
.. _box_protocol-id:
327343

@@ -336,7 +352,8 @@ disable certain features in interacting with these clients.
336352

337353
The body is a 2-item map:
338354

339-
.. image:: images/id.svg
355+
.. raw:: html
356+
:file: images/id.svg
340357

341358
The response body has the same structure as
342359
the request body. It informs the client about the protocol version and features

doc/dev_guide/internals/iproto/sql.rst

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ Code: 0x0b.
3838

3939
The body is a 3-item map:
4040

41-
.. image:: images/execute.svg
41+
.. raw:: html
42+
:file: images/execute.svg
4243

4344
* Use IPROTO_STMT_ID (0x43) and statement-id (MP_INT) if executing a prepared statement.
4445
Use IPROTO_SQL_TEXT (0x40) and statement-text (MP_STR) if executing an SQL string.
@@ -59,7 +60,8 @@ with two ? placeholders, and execute with two parameters, thus:
5960
6061
Then the body will look like this:
6162

62-
.. image:: images/execute_example_1.svg
63+
.. raw:: html
64+
:file: images/execute_example_1.svg
6365

6466
The :ref:`Understanding binary protocol <box_protocol-illustration>`
6567
tutorial shows actual byte codes of the IPROTO_EXECUTE message.
@@ -89,7 +91,8 @@ In the iproto request, there would be no IPROTO_DATA and there would be two addi
8991
* ``34 00 = IPROTO_BIND_COUNT and MP_UINT = 0`` (there are no parameters to bind).
9092
* ``33 90 = IPROTO_BIND_METADATA and MP_ARRAY, size 0`` (there are no parameters to bind).
9193

92-
.. image:: images/execute_example_2.svg
94+
.. raw:: html
95+
:file: images/execute_example_2.svg
9396

9497
.. _box_protocol-prepare:
9598

@@ -100,7 +103,8 @@ Code: 0x0d.
100103

101104
The body is a 1-item map:
102105

103-
.. image:: images/prepare.svg
106+
.. raw:: html
107+
:file: images/prepare.svg
104108

105109
Thus the IPROTO_PREPARE map item is the same as the first item of the
106110
:ref:`IPROTO_EXECUTE <box_protocol-execute>` body.
@@ -118,7 +122,8 @@ Responses to SELECT, VALUES, or PRAGMA
118122

119123
If the SQL statement is SELECT or VALUES or PRAGMA, the response contains:
120124

121-
.. image:: images/sql_response_select.svg
125+
.. raw:: html
126+
:file: images/sql_response_select.svg
122127

123128

124129
Example
@@ -134,7 +139,8 @@ and then select the two rows from a table named t1 that has columns named DD and
134139
135140
The response body might look like this:
136141

137-
.. image:: images/sql_response_select_example.svg
142+
.. raw:: html
143+
:file: images/sql_response_select_example.svg
138144

139145
The tutorial :ref:`Understanding the binary protocol <box_protocol-illustration>`
140146
shows actual byte codes of responses to the above SQL messages.
@@ -147,7 +153,8 @@ If the SQL request is not SELECT or VALUES or PRAGMA, then the response body
147153
contains only IPROTO_SQL_INFO (0x42). Usually IPROTO_SQL_INFO is a map with only
148154
one item -- SQL_INFO_ROW_COUNT (0x00) -- which is the number of changed rows.
149155

150-
.. image:: images/sql_response_other.svg
156+
.. raw:: html
157+
:file: images/sql_response_other.svg
151158

152159
For example, if the request is :samp:`INSERT INTO {table-name} VALUES (1), (2), (3)`, then the response body
153160
contains an :samp:`IPROTO_SQL_INFO` map with :samp:`SQL_INFO_ROW_COUNT = 3`.

0 commit comments

Comments
 (0)