meilisearch / heed

A fully typed LMDB wrapper with minimum overhead 🐦
https://docs.rs/heed
MIT License
632 stars 57 forks source link

Expose a safe low-level cursor API. #255

Open nolanderc opened 7 months ago

nolanderc commented 7 months ago

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:

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

MathGeniusJodie commented 3 months ago

ooh, if that makes multiget possible I'm really looking forward to it!

Kerollmops commented 3 months ago

Hey @MathGeniusJodie, @oXtxNt9U, @sebastijankuzner, and @Nuhvi 👋

It's an open-source repository. Feel free to propose solutions though play.rust-lang.org (before implementation) and probably directly expose the internal Cursor type and make it more safe or wrap it if necessary.

Have a nice day 🌞