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 to check if KEY exists or alternatively check if VALUE exists in all keys #69

Closed
unnaturalistic opened this issue Mar 13, 2023 · 2 comments

Comments

@unnaturalistic
Copy link

how to check if a key exists or alternatively if a value exists in the database
i am using nodejs and making an express app

@vweevers
Copy link
Member

See Level/community#106, which contains several ways to do it today, and a proposal for doing it with a new API that would have optimal performance.

As for checking whether a value exists, that doesn't fit in the key-centric design of level (or any key-value database). You would have to create an index so that you can lookup values (as keys).

@unnaturalistic
Copy link
Author

thank you!

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