Skip to content
Snippets Groups Projects
Commit 71a0f417 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

box-protocol.txt: document splice.

parent 4743e55d
No related branches found
No related tags found
No related merge requests found
......@@ -265,6 +265,9 @@
; 2 - bitwise AND of argument and field <field_no>
; 3 - bitwise XOR of argument and field <field_no>
; 4 - bitwise OR of argument and field <field_no>
; Tarantool 1.3.5 features one more command, which operates
; on strings:
; 5 - implementation of Perl 'splice' command
<op_code> ::= <int8> # 0 | 1 | 2 | 3
......@@ -272,8 +275,26 @@
; It's an error to specify an argument of a type that
; differs from expected type.
;
; 'splice' operates on string field, and has 4 arguments:
; field number, offset in the field, number of bytes to remove,
; length of the string argument to inject, the string
<op_arg> ::= <field>
<op_arg> ::= <field> | <splice_op_arg>
;
; <offset> is a non-negative integer, within the size of the
; original field. If offset is beyond the length of the
; field, it is set to the current length of the field.
; <length> is an integer, indicating the number of bytes to remove.
; If <length> ; is negative, all bytes until <length> to the
; end of the field are removed. <field> is injected in place of the
; removed string.
;
<splice_op_arg> ::= <offset><length><field>
<length> ::= <int32>
;
<update_response_body> ::= <insert_response_body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment