Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Add db.getMany(keys) #381

Merged
merged 3 commits into from
Sep 28, 2021
Merged

Add db.getMany(keys) #381

merged 3 commits into from
Sep 28, 2021

Conversation

vweevers
Copy link
Member

@vweevers vweevers commented Sep 25, 2021

Tested against leveldown, memdown, level-js, deferred-leveldown, encoding-down, (indirectly) levelup, subleveldown.

Ref Level/community#101

@vweevers vweevers added enhancement New feature or request semver-minor New features that are backward compatible labels Sep 25, 2021

this._getMany(serialized, options, callback)
return callback.promise
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that here we're doing everything that levelup normally does, as an experiment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which means that levelup only has to do this:

LevelUP.prototype.getMany = function (keys, options, callback) {
  return this.db.getMany(keys, options, callback)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So later on we can move over the catering stuff to abstract-leveldown one by one.

abstract-leveldown.js Outdated Show resolved Hide resolved
@vweevers
Copy link
Member Author

vweevers commented Sep 28, 2021

Added in the last commit (1f1ab97):

  • AbstractLevelDOWN.prototype.isOperational() which returns true if the db accepts operations. Normally that means when db.status is 'open', and deferred-leveldown can override _isOperational() to also accept operations when db.status is 'opening'.
  • More tests

And removed:

@vweevers vweevers merged commit e4445a7 into master Sep 28, 2021
vweevers added a commit to Level/subleveldown that referenced this pull request Oct 1, 2021
@vweevers vweevers deleted the get-many branch October 1, 2021 13:27
vweevers added a commit to Level/subleveldown that referenced this pull request Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request semver-minor New features that are backward compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants