index_object:delete_range()
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; ifbegin_keyis empty, tuples are deleted starting from the beginning of the index -
end_key(scalar/table) — end of the key range, exclusive; ifend_keyis 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_CONFLICTif a transaction conflict is detected in the MVCC transaction mode
Example:
box.space.test.index.ts:delete_range({}, week_ago)