Single column unique (e.g. key only).
@Entity(tableName = "item", indices = [Index(value = "id_key", unique = true)])data class Item (}
Combine two columns to be unique (e.g. type and key).
@Entity(tableName = "item", indices = [Index(value = ["item_type", "id_key"], unique = true)])data class Item (}
Multiple unique constaints.
@Entity(tableName = "item", indices = [Index(value = "id_key", unique = true), Index(value = ["item_type", "another_key"], unique = true)])data class Item (}