Skip to content

Commit f204d02

Browse files
committed
Added PropertyFlags.INDEX_HASH
1 parent bed64c8 commit f204d02

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

objectbox-java/src/main/java/io/objectbox/model/PropertyFlags.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,15 @@ private PropertyFlags() { }
4848
* Virtual properties may not have a dedicated field in their entity class, e.g. target IDs of to-one relations
4949
*/
5050
public static final int VIRTUAL = 1024;
51+
/**
52+
* Index uses a 32 bit hash instead of the value
53+
* (32 bits is shorter on disk, runs well on 32 bit systems, and should be OK even with a few collisions)
54+
*/
55+
public static final int INDEX_HASH = 2048;
56+
/**
57+
* Index uses a 64 bit hash instead of the value
58+
* (recommended mostly for 64 bit machines with values longer >200 bytes; small values are faster with a 32 bit hash)
59+
*/
60+
public static final int INDEX_HASH64 = 4096;
5161
}
5262

0 commit comments

Comments
 (0)