meilisearch / heed

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

Improve the `Rw*Iter::put_current` methods to be less restrictive #222

Closed Kerollmops closed 8 months ago

Kerollmops commented 8 months ago

In this PR, we rename the Rw*Iter::put_current_with_flags functions into Rw*Iter::put_current_with_options and make it possible to change the data codec simultaneously. This way, we do not introduce a new put_current function that cannot accept LMDB PutFlags.

We also modify the Rw*Iter::put_current_reserved into a Rw*Iter::put_current_reserved_with_flags to make it possible to specify other flags at the same time as using the "reserved" API interface.