denoland / denoland/deploy_feedback
[KV Feedback]: Make range end inclusive in `list`
- Dominant language
- No language data
- Stars
- 79
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### 🔍
- [x] Did you search for existing issues?
### Type of feedback
Bug report
### Description
Currently, the `start` of a range in `list` is inclusive, while the `end` is exclusive.
This asymmetry makes it hard to paginate a given range of keys, because you need to know one key further than the last key you want.
The `end` option in `list` should be inclusive.
This also affects paginating from one key over a certain amount of keys. You can paginate in the forward direction from the key using `start` and `limit`. However, if you want to paginate backwards from the key using `end`, `limit` and `reverse: true`, you’re out of luck, since you’d need to know one key further for `end`.
An exclusive range is less useful than an inclusive one, since you can always discard the first or last item to get an exclusive range from an inclusive one, but you can’t get one more item that you don’t have to get from an exclusive range to an inclusive one.
### Steps to reproduce (if applicable)
_No response_
### Expected behavior (if applicable)
_No response_
### Possible solution (if applicable)
_No response_
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.