Skip to content

Commit ae5e2bf

Browse files
committed
Expand JavaDocs for DbiFlags as per native mdb_dbi_open docs
1 parent 6c26423 commit ae5e2bf

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

src/main/java/org/lmdbjava/DbiFlags.java

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,20 @@ public enum DbiFlags implements MaskedFlag {
2727

2828
/**
2929
* Use reverse string keys.
30+
*
31+
* <p>
32+
* Keys are strings to be compared in reverse order, from the end of the
33+
* strings to the beginning. By default, keys are treated as strings and
34+
* compared from beginning to end.
3035
*/
3136
MDB_REVERSEKEY(0x02),
3237
/**
3338
* Use sorted duplicates.
39+
*
40+
* <p>
41+
* Duplicate keys may be used in the database. Or, from another perspective,
42+
* keys may have multiple data items, stored in sorted order. By default keys
43+
* must be unique and may have only a single data item.
3444
*/
3545
MDB_DUPSORT(0x04),
3646
/**
@@ -40,18 +50,38 @@ public enum DbiFlags implements MaskedFlag {
4050
MDB_INTEGERKEY(0x08),
4151
/**
4252
* With {@link #MDB_DUPSORT}, sorted dup items have fixed size.
53+
*
54+
* <p>
55+
* This flag may only be used in combination with {@link #MDB_DUPSORT}. This
56+
* option tells the library that the data items for this database are all the
57+
* same size, which allows further optimizations in storage and retrieval.
58+
* When all data items are the same size, the {@link SeekOp#MDB_GET_MULTIPLE}
59+
* and {@link SeekOp#MDB_NEXT_MULTIPLE} cursor operations may be used to
60+
* retrieve multiple items at once.
4361
*/
4462
MDB_DUPFIXED(0x10),
4563
/**
4664
* With {@link #MDB_DUPSORT}, dups are {@link #MDB_INTEGERKEY}-style integers.
65+
*
66+
* <p>
67+
* This option specifies that duplicate data items are binary integers,
68+
* similar to {@link #MDB_INTEGERKEY} keys.
4769
*/
4870
MDB_INTEGERDUP(0x20),
4971
/**
5072
* With {@link #MDB_DUPSORT}, use reverse string dups.
73+
*
74+
* <p>
75+
* This option specifies that duplicate data items should be compared as
76+
* strings in reverse order.
5177
*/
5278
MDB_REVERSEDUP(0x40),
5379
/**
54-
* Create DB if not already existing.
80+
* Create the named database if it doesn't exist.
81+
*
82+
* <p>
83+
* This option is not allowed in a read-only transaction or a read-only
84+
* environment.
5585
*/
5686
MDB_CREATE(0x4_0000);
5787

0 commit comments

Comments
 (0)