Submodule box.index
The box.index
submodule provides read-only access for index definitions and
index keys. Indexes are contained in box.space.space-name.index
array
within each space object. They provide an API for ordered iteration over tuples.
This API is a direct binding to corresponding methods of index objects of type
box.index
in the storage engine.
Below is a list of all box.index
functions and members.
Name | Use |
---|---|
Examples for box.index | Some useful examples |
space_object:create_index() | Create an index |
index_object.unique | Flag, true if an index is unique |
index_object.type | Index type |
index_object:parts | Array of index key fields |
index_object:pairs() | Prepare for iterating |
index_object:select() | Select one or more tuples via index |
index_object:get() | Select a tuple via index |
index_object:min() | Find the minimum value in index |
index_object:max() | Find the maximum value in index |
index_object:random() | Find a random value in index |
index_object:count() | Count tuples matching key value |
index_object:update() | Update a tuple |
index_object:delete() | Delete a tuple by key |
index_object:alter() | Alter an index |
index_object:drop() | Drop an index |
index_object:rename() | Rename an index |
index_object:bsize() | Get count of bytes for an index |
index_object:stat() | Get statistics for an index |
index_object:compact() | Remove unused index space |
index_object:tuple_pos() | Return a tuple’s position for an index |
index_object extensions | Any function / method that any user wants to add |