-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Drop support of key & value types other than string and Buffer #174
Labels
semver-major
Changes that break backward compatibility
Comments
We can't do it exactly the way I proposed in Level/memdown#186 (comment):
Because not all runtime environments support binary keys. In those we must use string keys only. I'm thinking we'll replace: Lines 143 to 151 in 86dd5e7
With: Level.prototype._serializeKey = function (key) {
if (Level.binaryKeys) {
return Buffer.isBuffer(key) ? key : Buffer.from(String(key))
} else {
return String(key)
}
} |
vweevers
changed the title
Drop support of key types other than string and Buffer
Drop support of key & value types other than string and Buffer
Aug 17, 2019
Also try to find a way to support reading/migrating existing data (that was stored as a string). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background: Level/memdown#186.
The text was updated successfully, but these errors were encountered: