space_object:delete_range()
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; 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 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_CONFLICTif a transaction conflict is detected in the MVCC transaction mode.
Example:
box.space.test:delete_range(pk_begin_key, {})