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

Add support for every database flags #200

Merged
merged 22 commits into from
Aug 23, 2023
Merged

Add support for every database flags #200

merged 22 commits into from
Aug 23, 2023

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Aug 6, 2023

This Pull Request is based on #197.

It brings the support of the DUP_SORT, DUP_FIXED, REVERSE_KEY, INTEGER_KEY, INTEGER_DUP, and REVERSE_DUP flags.

I removed the Database::append method with the more generic Database::put_with_flags one. This new method can use the NO_DUP_DATA, NO_OVERWRITE, APPEND, and APPEND_DUP options. The same happened for all the Iterator::append methods replaced with Iterator::put_current_with_flags methods.

  • Ensure a Database is always opened with the same flags.
  • Implement Debug on the different iterators.
  • Add three new type parameters to the multiple iterators, exposing their behavior.
    • Introduce the IterationMethod trait.
    • The three MoveThroughDuplicateValues, MoveBetweenKeys, and MoveOnCurrentKeyDuplicates Zero-sized types.
    • Make sure that moving on the first or last also moves on the last dup value.
  • Add documentation example of the different flags:
    • For the DUP_SORT flag
    • For the DUP_FIXED flag
    • For the REVERSE_KEY flag
    • For the INTEGER_KEY flag
    • For the INTEGER_DUP flag
    • For the REVERSE_DUP flag

@Kerollmops Kerollmops added the breaking A change that is breaking the semver label Aug 6, 2023
@Kerollmops Kerollmops added this to the v0.20.0 milestone Aug 6, 2023
@Kerollmops Kerollmops changed the title Add initial MDB_DUPSORT support Add support for every database flags Aug 7, 2023
@mikedilger
Copy link

I'm hoping for some kind of delete_dup(key, value)

@Kerollmops Kerollmops force-pushed the dup-sort-support branch 2 times, most recently from ef7e049 to 4ac1f64 Compare August 8, 2023 12:30
@Kerollmops
Copy link
Member Author

Follow this toot instructions.

@Kerollmops Kerollmops force-pushed the dup-sort-support branch 2 times, most recently from ed7bf9b to 83f8920 Compare August 23, 2023 09:29
@Kerollmops Kerollmops marked this pull request as ready for review August 23, 2023 09:49
@Kerollmops
Copy link
Member Author

As I am the only one available on the team and the CI seems happy, I will merge by hand without approval 🆘

@Kerollmops Kerollmops merged commit 24994aa into main Aug 23, 2023
8 checks passed
@Kerollmops Kerollmops deleted the dup-sort-support branch August 23, 2023 10:35
@Kerollmops Kerollmops mentioned this pull request Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A change that is breaking the semver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants