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

Expose a safe low-level cursor API. #255

Open
nolanderc opened this issue Apr 29, 2024 · 0 comments
Open

Expose a safe low-level cursor API. #255

nolanderc opened this issue Apr 29, 2024 · 0 comments

Comments

@nolanderc
Copy link
Contributor

The LMDB cursor API is quite powerful; something similar should be exposed by heed. The RwIter API gets close, but is unsafe and does not handle seeking to arbitrary keys. The API should allow the following operations:

  • Seeking to an arbitrary key.
  • Seeking to the next/previous key-value pair.
  • Reading the current key/value (could be part of the seeking operations).
  • Inserting an arbitrary key-value pair (LMDB optimizes for cases where the key would end up close to where the cursor is currently pointing).

A full cursor API would also let us efficiently implement an API similar to HashMap::entry (see this comment).

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

1 participant