Last active
June 21, 2016 11:42
-
-
Save krisskross/44479ba1320becbe869c1c6adba011ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ByteBuffer seekKey = ByteBuffer.allocateDirect(4).putInt(4); | |
try (Cursor cursor = db.openCursor(tx)) { | |
if (cursor.get(seekKey, MDB_SET_KEY)) { | |
// regular users | |
ByteBuffer key = cursor.key(); | |
ByteBuffer val = cursor.val(); | |
do { | |
// advanced users | |
long keyAddress = cursor.keyAddress(); | |
long keySize = cursor.keySize(); | |
long valAddress = cursor.valAddress(); | |
long keySize = cursor.valSize(); | |
} while (cursor.get(MDB_NEXT)); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment