Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add db.getMany(keys) #89

Merged
merged 3 commits into from
Sep 30, 2021
Merged

Add db.getMany(keys) #89

merged 3 commits into from
Sep 30, 2021

Conversation

vweevers
Copy link
Member

@vweevers vweevers commented Sep 25, 2021

Ref Level/community#101. Depends on Level/abstract-leveldown#381 and Level/memdown#212 (for tests).

Also closes #90, closes #91.

@vweevers vweevers added the enhancement New feature or request label Sep 25, 2021
@vweevers vweevers added the semver-minor New features that are backward compatible label Sep 25, 2021
@vweevers vweevers added semver-major Changes that break backward compatibility and removed semver-minor New features that are backward compatible labels Sep 28, 2021
@vweevers vweevers marked this pull request as ready for review September 28, 2021 21:29
@vweevers
Copy link
Member Author

Would have made a separate PR for the last commit (c197496) were it not for the fact that getMany() doesn't work without.

deferred-chained-batch.js Outdated Show resolved Hide resolved
deferred-iterator.js Show resolved Hide resolved
deferred-leveldown.js Outdated Show resolved Hide resolved
In other states (besides 'open') a 'Database is not open' error is
now thrown. This reduces the scope of `deferred-leveldown` to what's
strictly needed in `levelup` and aligns behavior.

In addition, override public methods of `abstract-leveldown` instead
of private methods. This has one downside: they need to do the same
callback to promise conversion that `abstract-leveldown` does. The
upside is that operation callbacks are not called before the db has
finished opening, including in cases where `abstract-leveldown` has
a fast-path, like on `db.batch([])` which because the array is
empty bypasses `_batch()`.

Closes #91
Closes #90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request semver-major Changes that break backward compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests for for await...of db.iterator() Reduce scope to what is strictly needed in levelup
3 participants