IndexType enum

IndexType can be used to change what type ObjectBox uses when indexing a property.

Limits of hash/hash64 indexes: Hashes work great for equality checks, but not for "starts with" conditions. If you frequently use those, consider value indexes instead for String properties.

Inheritance
Available extensions

Values

value → const IndexType

Uses property values to build the index. This is a default for scalar properties.

If used for a String property, this may require more storage space than it's default, hash.

hash → const IndexType

Uses a 32-bit hash of the field value; default for String properties.

Hash collisions should be sporadic and shouldn't impact performance in practice. Because it requires less storage space, it's usually a better choice than hash64.

hash64 → const IndexType

Uses a long hash of the field value to build the index. Uses more storage space than hash, thus should be used with consideration.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<IndexType>
A constant List of the values in this enum, in order of their declaration.