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

space_object:delete_range()

delete_range(begin_key, end_key)

Delete a range of tuples identified by a key range.

Parameters:

  • space_object (space_object) — an object reference

  • 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 space uses the vinyl engine

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

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

Example:

box.space.test:delete_range(pk_begin_key, {})