index_object:min() | Tarantool
Tarantool
Check out the new release policy

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 the optional key value is supplied, returns the first key that is greater than or equal to key. Starting with Tarantool 2.0.4, index_object:min(key) returns nothing if key doesn’t match any value in the index.

Rtype:

tuple

Possible errors:

  • Index is not of type ‘TREE’.
  • ER_TRANSACTION_CONFLICT if a transaction conflict is detected in the MVCC transaction mode.

Complexity factors: Index size, Index type.

Example:

tarantool> box.space.tester.index.primary:min()
---
- ['Alpha!', 55, 'This is the first tuple!']
...
Found what you were looking for?
Feedback