index_object:update() | Tarantool

index_object:update()

object index_object
index_object:update(key, {{operator, field_no, value}, ...})

Update a tuple.

Same as box.space…update(), but key is searched in this index instead of primary key. This index ought to be unique.

Parameters:
  • index_object (index_object) – an object reference.
  • key (scalar/table) – values to be matched against the index key
  • operator (string) – operation type represented in string
  • field_no (number) – what field the operation will apply to. The field number can be negative, meaning the position from the end of tuple. (#tuple + negative field number + 1)
  • value (lua_value) – what value will be applied
Return:
  • the updated tuple
  • nil if the key is not found
Rtype:

tuple or nil

Found what you were looking for?
Feedback