Enums and Custom Types
ObjectBox Swift supports enums and custom types: here's how.
Int8, UInt8
Int16, UInt16
Int32, UInt32
Int64, Int, UInt64, UInt
Float, Double
Data, [UInt8]
String
DateEnums
enum TestEnum: Int {
case unknown = 0
case first = 100
case second = 200
case third = 300
}
class EnumEntity: Entity {
var id: Id = 0
// objectbox: convert = { "default": ".unknown" }
var custom: TestEnum
}Enums in queries
Custom Property Converters
Things to look out for
List/Array types
Custom types in queries
Last updated