Skip to content

Remove start & end from range options #86

Closed
@vweevers

Description

@vweevers

I propose that we remove the start and end options from iterators & streams. Without doing a soft deprecation, because they were documented as legacy options 5 years ago. I prefer ripping off the band aid and throwing an error if start or end properties are present in options.

@Level/core Anyone opposed? Give a thumbs up or down. Keep reading for the motivation.


The start/end options are more surprising in reverse mode. While ltgte options fulfill the documented promise of "the returned entries are the same, but in reverse", start/end options must be swapped by the user to achieve that.

The relevant code to handle the whole set of options - which I think in many implementations has been built up through trial & error, putting trust in the extensive tests - is hard to follow, and hard to change.

In addition, there are rules of precedence between start/end and ltgte although a formal decision was never made (Level/abstract-leveldown#70) and tests don't cover it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionDiscussionsemver-majorChanges that break backward compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions