tarantool / tarantool/doc

a new range delete API introduced

Open Beginner friendly
#5,712 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Since: 3.9

The API allows to delete a range of keys from an index. A key range is
specified by begin_key + end_key pair. As a result of a call, key
range starting from begin_key lower bound up until end_key lower
bound (excluding) is deleted. Empty keys are special: if begin_key
is empty, tuples from the index beginning are deleted, if end_key
is empty, tuples up to the index end are deleted.

Examples:

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

Only supported by MemTX and only for primary keys for now.

Available from Lua as [space|index]:delete_range(begin_key, end_key)
and from C API as box_delete_range with the following signature:

int
box_delete_range(uint32_t space_id, uint32_t index_id,
		 const char *begin_key, const char *begin_key_end,
		 const char *end_key, const char *end_key_end);

Requested by @mkostoevr in https://github.com/tarantool/tarantool/commit/a0d551db12a5e8887ffab610ceba772fe4959074.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing documentation for space or index methods and the C API reference, then add the described delete_range behavior, examples, availability limits, and box_delete_range signature. Done means both Lua and C interfaces are documented consistently, including empty-key bounds and the MemTX primary-key restriction.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.