◐ Shell
clean mode source ↗

Iterator performance by stroomdev66 · Pull Request #270 · lmdbjava/lmdbjava

and others added 27 commits

March 6, 2025 16:04
There are now essentially three ways of configuring comparators
when creating a Dbi.

**null comparator**
LMDB will use its own comparator & CursorIterable will call down
to mdb_cmp for comparisons between the current cursor key and the
range start/stop key.

**provided comparator**
LMDB will use its own comparator & CursorIterable will use the
provided comparator for comparisons between the current cursor
key and the range start/stop key.

**provided comparator with nativeCb==true**
LMDB will call back to java for all comparator duties.
CursorIterable will use the same provided comparator for
comparisons between the current cursor key and the range
start/stop key.

The methods `getSignedComparator()` and `getUnsignedComparator()`
have been made public so users of this library can access them.
Refactor DbiBuilder and Dbi ctor to use DbiFlagSet.
Replace Env#copy(File, CopyFlags...) with copy(File, CopyFlagSet).
As there is only one flag this should not be a breaking change.

Deprecate Env#txn(Txn, TxnFlags...) as there is now
Env#txn(Txn)
Env#txn(Txn, TxnFlags)
Env#txn(Txn, TxnFlagSet)
Also improve javadoc and refactor some tests to use DbiBuilder.

Some tests are failing.

This was referenced

Nov 7, 2025
…dkey

Combines the fixes for gh-249 and gh-267 as they are dependant on each
other.
…ava into iterator-performance
…ava into iterator-performance

# Conflicts:
#	src/test/java/org/lmdbjava/CursorIterableIntegerDupTest.java
#	src/test/java/org/lmdbjava/CursorIterableRangeTest.java

github-advanced-security[bot]