Skip to content

FindIn plugin example fails when at least 2 keys being looked for are smaller than the smallest key in the db #40

@randalpinto

Description

@randalpinto

If you have let's say "2013", "2014", "2015" in the database and if you search for ["2011", "2012"] the plugin fails as it goes into:

if (cursor.key > keys[current]) {
result.push(undefined); // key not found
current += 1;
cursor.continue(keys[current]);
}

and then it tries to execute:

cursor.continue("2012") but the current cursor position is "2013" so the operation returns an error.

Granted it is just an example but it was a useful operation for me and I found the issue while trying to use it. I'd vote for it to become an official plugin as large lookups are a lot faster performed like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions