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

How can I efficiently create sublevel? #123

Open
anidotnet opened this issue Jul 30, 2020 · 1 comment
Open

How can I efficiently create sublevel? #123

anidotnet opened this issue Jul 30, 2020 · 1 comment

Comments

@anidotnet
Copy link

How do I efficiently create sublevel db with different comparator? Do you have any example or test case?

@pcmind
Copy link
Contributor

pcmind commented Sep 14, 2020

Leveldb does not support sublevel with multiple comparators.
You can achieve this by creating a distinct DB for each sublevel or a better approach (depending on the usecase) would be to use a key prefix to differentiate each sublevel and make a single comparator aware of those prefixes/sublevel comparators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants