Skip to content

Discrepancy with leveldown re "end" vs "lte" and "lt" #1

@rvagg

Description

@rvagg

@timoxley noticed this, I'm just reporting the details: if you compare leveldown to memdown you find a discrepancy if you provide both a lte or lt property and an end property for an iterator. Obviously this isn't something you should really be doing but it's not out of the realms of possibility that someone would want to provide these properties together.

memdown treats the lte and lt as authoratative, overriding whatever end says, while leveldown takes the minimum of the options.

Compare: https://github.com/dominictarr/ltgt/blob/master/index.js#L50-L56 (lowerBound but same logic applies for upperBound I think, it's just clearer here) to https://github.com/Level/leveldown/blob/master/src/iterator.cc#L141-L153

This is something that we should resolve in AbstractLevelDOWN tests I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions