Tarantool CE/EE Documentation portal logo
Support
Updated at November 2, 2026   03:35 PM

index_object:delete_range()

object index_object

index_object:delete_range(begin_key, end_key)

Delete a range of tuples identified by a key range, searched in this index.

Parameters:

  • index_object (index_object) — an object

  • begin_key (scalar/table) — beginning of the key range, inclusive; if begin_key is empty, tuples are deleted starting from the beginning of the index

  • end_key (scalar/table) — end of the key range, exclusive; if end_key is empty, tuples are deleted up to the end of the index

Returns

nothing

Possible errors:

  • IllegalParams "begin_key must be < end_key" if the specified range is invalid

  • "vinyl does not support range delete" if the index belongs to a vinyl space

  • "Index '<name>' (<TYPE>) of space '<name>' (memtx) does not support delete_range()" if the index is not of the TREE type

  • "Engine 'memtx' does not support delete_range() on secondary index" if the index is not the space's primary index

  • ER_TRANSACTION_CONFLICT if a transaction conflict is detected in the MVCC transaction mode

Example:

box.space.test.index.ts:delete_range({}, week_ago)