index_object:update() | Tarantool


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

Update a tuple.

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

  • 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
  • the updated tuple
  • nil if the key is not found

tuple or nil

Found what you were looking for?