Question: Iterator API
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 748
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
As of now the iterator API is `db.iterator(prefix, opts)`, and one of thse opts is a boolean `gte`, which is fine (and extensive) when results are hash-sorted.
With lex-sorted results it makes sense to have `lt` and `lte` options, at which point it's odd if those options are strings but `gte` is a boolean.
I know this is currently an undocumented API that's just used to power `db.list`, but moving forward would it make sense to stay consistent with Level and change the API to `db.iterator(opts)`, where `gt`, `gte`, `lt` and `lte` are all string options?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the db.iterator API and its use by db.list, especially how gte, gt, lt, and lte are currently handled. Determine whether changing to db.iterator(opts) with string range options is compatible with existing callers; done means resolving the API design and updating the affected behavior and documentation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100