Indexing
@Table(database = TestDatabase::class,
indexGroups = [
IndexGroup(number = 1, name = "firstIndex"),
IndexGroup(number = 2, name = "secondIndex"),
IndexGroup(number = 3, name = "thirdIndex")
])
class IndexModel2 {
@Index(indexGroups = {1, 2, 3})
@PrimaryKey
var id: Int = 0
@Index(indexGroups = 1)
@Column
var firstName: String = ""
@Index(indexGroups = 2)
@Column
var lastName: String = ""
@Index(indexGroups = {1, 3})
@Column
var createdDate: Date? = null
@Index(indexGroups = {2, 3})
@Column
var isPro: Boolean = false
}SQLite Index Wrapper
Last updated
Was this helpful?