|
205 | 205 |
|
206 | 206 | .. _box_box_sequence_current:
|
207 | 207 |
|
208 |
| -.. c:function:: int box_sequence_current(uint32_t seq_id, int64_t *result); |
| 208 | +.. c:function:: int box_sequence_current(uint32_t seq_id, int64_t *result) |
209 | 209 |
|
210 | 210 | Since version :doc:`2.4.1 </release/2.4.1>`.
|
211 | 211 | Return the last retrieved value of the specified sequence.
|
|
217 | 217 | :return: 0 on success and -1 otherwise. In case of an error user
|
218 | 218 | could get it via ``box_error_last()``.
|
219 | 219 |
|
220 |
| -.. _box_box_session_id: |
| 220 | +.. _box_box_schema_version: |
221 | 221 |
|
222 |
| -.. c:function:: uint64_t box_session_id(void); |
| 222 | +.. c:function:: uint32_t box_schema_version(void) |
| 223 | +
|
| 224 | + Since version :doc:`2.11.0 </release/2.11.0>`. |
| 225 | + Return the database schema version. |
| 226 | + A schema version is a number that indicates whether the :ref:`database schema <index-box-data_schema_description>` is changed. |
| 227 | + For example, the ``schema_version`` value grows if a :ref:`space <index-box_space>` or :ref:`index <index-box_index>` |
| 228 | + is added or deleted, or a space, index, or field name is changed. |
| 229 | +
|
| 230 | + :return: the database schema version |
| 231 | + :rtype: number |
| 232 | +
|
| 233 | + See also :ref:`box.info.schema_version <box_info_schema_version>` and :ref:`IPROTO_SCHEMA_VERSION <internals-iproto-keys-schema_version>`. |
| 234 | +
|
| 235 | +.. _box_box_session_id: |
| 236 | +
|
| 237 | +.. c:function:: uint64_t box_session_id(void) |
223 | 238 |
|
224 | 239 | Since version :doc:`2.11.0 </release/2.11.0>`.
|
225 | 240 | Return the unique identifier (ID) for the current session.
|
226 | 241 |
|
227 | 242 | :return: the unique identifier (ID) for the current session
|
228 | 243 | :return: 0 or -1 if there is no session
|
229 | 244 |
|
230 |
| - See also :ref:`box.session.id()<box_session-id>` |
| 245 | + See also :ref:`box.session.id() <box_session-id>` |
| 246 | +
|
| 247 | +.. _box_box_iproto_send: |
| 248 | +
|
| 249 | +.. c:function:: int box_iproto_send(uint64_t sid, char *header, char *header_end, char *body, char *body_end) |
| 250 | +
|
| 251 | + Since version :doc:`2.11.0 </release/2.11.0>`. |
| 252 | + Sends an :ref:`IPROTO <internals-iproto-format>` packet over the session's socket with the given MsgPack header |
| 253 | + and body. NB: делает yield. |
| 254 | +
|
| 255 | + :param uint32_t sid: space identifier |
| 256 | + :param char* header: |
| 257 | + :param char* header_end: |
| 258 | + :param char* body: |
| 259 | + :param char* body_end: encoded tuple in MsgPack Array format ([ field1, field2, ...]) |
| 260 | +
|
| 261 | + :return: 0 on success or 1 if there is a failure |
| 262 | +
|
| 263 | + See also :ref:`box.session.id() <box_session-id>` |
0 commit comments