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.
[x] Ensure a Database is always opened with the same flags.
[x] Implement Debug on the different iterators.
[x] Add three new type parameters to the multiple iterators, exposing their behavior.
[x] Introduce the IterationMethod trait.
[x] The three MoveThroughDuplicateValues, MoveBetweenKeys, and MoveOnCurrentKeyDuplicates Zero-sized types.
[x] Make sure that moving on the first or last also moves on the last dup value.
[x] Add documentation example of the different flags:
This Pull Request is based on #197.
It brings the support of the
DUP_SORT
,DUP_FIXED
,REVERSE_KEY
,INTEGER_KEY
,INTEGER_DUP
, andREVERSE_DUP
flags.I removed the
Database::append
method with the more genericDatabase::put_with_flags
one. This new method can use theNO_DUP_DATA
,NO_OVERWRITE
,APPEND
, andAPPEND_DUP
options. The same happened for all theIterator::append
methods replaced withIterator::put_current_with_flags
methods.Database
is always opened with the same flags.IterationMethod
trait.MoveThroughDuplicateValues
,MoveBetweenKeys
, andMoveOnCurrentKeyDuplicates
Zero-sized types.DUP_SORT
flagDUP_FIXED
flagREVERSE_KEY
flagINTEGER_KEY
flagINTEGER_DUP
flagREVERSE_DUP
flag