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 support for multi-byte keys. #25

Merged
merged 3 commits into from
Jun 17, 2024
Merged

Add support for multi-byte keys. #25

merged 3 commits into from
Jun 17, 2024

Conversation

nodech
Copy link
Member

@nodech nodech commented Jun 13, 2024

BDB keys now support multi-byte keys. Adds support for Buffers as keys. All keys internally they will be represented as bytes, instead of numbers.

  • Add buffer support: bdb.key(Buffer.from([1,2,3]))
  • Add multi char string support: bdb.key('abc')

NOTE: Number is not supported for multi-byte keys. (We could potentially add number -> buffer and BigInt -> buffer, but better use buffers in this case)

@nodech nodech merged commit e03c815 into master Jun 17, 2024
20 checks passed
@nodech nodech deleted the bigger-keys branch June 17, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant