Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.
/ deferred-leveldown Public archive

Add db.getMany(keys)#89

Merged
vweevers merged 3 commits intomasterfrom
get-many
Sep 30, 2021
Merged

Add db.getMany(keys)#89
vweevers merged 3 commits intomasterfrom
get-many

Conversation

@vweevers
Copy link
Copy Markdown
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
Copy Markdown
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.

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
@vweevers vweevers dismissed juliangruber’s stale review September 30, 2021 20:12

Comments were addressed.

@vweevers vweevers merged commit 0e8475f into master Sep 30, 2021
@vweevers vweevers deleted the get-many branch October 1, 2021 13:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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