File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
reference/reference_lua/box_space Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,21 @@ On this page:
152
152
name: primary
153
153
...
154
154
155
+ .. NOTE ::
156
+
157
+ Since version :doc: `2.7.1 </release/2.7.1 >` it is allowed to omit
158
+ extra braces in index definition if it consists of only one part.
159
+
160
+ .. code-block :: lua
161
+
162
+ --old way with extra braces (still correct)
163
+ my_space:create_index('one_part_idx', {parts = {{1, 'unsigned'}}})
164
+
165
+ --new way
166
+ my_space:create_index('one_part_idx', {parts = {1, 'unsigned'}})
167
+
168
+
169
+
155
170
.. _details_about_index_field_types :
156
171
157
172
.. _box_space-index_field_types :
Original file line number Diff line number Diff line change 39
39
~~~~
40
40
41
41
- Now it is allowed to define an index without extra braces when there
42
- is only one part: ``parts = {field1, type1, ...} `` (gh-2866).
42
+ is only one part: ``parts = {field1, type1, ...} `` (gh-2866). Read more in
43
+ the note after the example in :doc: `/reference/reference_lua/box_space/create_index `.
43
44
- Bitset index now supports the varbinary type (gh-5392).
44
45
- Index-related options now can’t be specified in their definition due
45
46
to a more pedantic key-parts verification (gh-5473).
You can’t perform that action at this time.
0 commit comments