Top.Mail.Ru
index_object:min() | Tarantool
Tarantool
Check out the new release 2.8

index_object:min()

index_object:min()

object index_object
index_object:min([key])

Find the minimum value in the specified index.

Parameters:
Return:

the tuple for the first key in the index. If optional key value is supplied, returns the first key which is greater than or equal to key value. Starting with Tarantool version 2.0, index_object:min(key value) will return nothing if key value is not equal to a value in the index.

Rtype:

tuple

Possible errors: index is not of type ‘TREE’.

Complexity factors: Index size, Index type.

Example:

tarantool> box.space.tester.index.primary:min()
---
- ['Alpha!', 55, 'This is the first tuple!']
...