index_object:max()
-
object
index_object
¶ -
index_object:
max
([key])¶ Find the maximum value in the specified index.
Parameters: - index_object (
index_object
) – an object reference - key (
scalar/table
) – values to be matched against the index key
Return: the tuple for the last key in the index. If the optional
key
value is supplied, returns the last key that is less than or equal tokey
. Starting with Tarantool 2.0.4,index_object:max(key)
returns nothing ifkey
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:max() --- - ['Gamma!', 55, 'This is the third tuple!'] ...
- index_object (
-