Skip to content

Commit f133368

Browse files
committed
Refer to byte ordering in tutorial (fixes #52)
1 parent 32c1561 commit f133368

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/org/lmdbjava/TutorialTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ public void tutorial4() throws IOException {
310310
final ByteBuffer key = allocateDirect(env.getMaxKeySize());
311311
final ByteBuffer val = allocateDirect(700);
312312

313-
// Insert some data
313+
// Insert some data. Note the ByteBuffer byte order is platform specific.
314+
// LMDB does not store or set byte order, but it's critical to sort keys.
315+
// If your numeric keys don't sort as expected, review buffer byte order.
314316
val.putInt(100);
315317
key.putInt(1);
316318
db.put(txn, key, val);

0 commit comments

Comments
 (0)