Index Builder
A DSL builder for creating INDEX and UNIQUE INDEX constraints on a table.
This builder is provided as the receiver in the indexes block of a KQLiteTable definition, allowing you to define one or more indexes for that table.
Example
override val indexes: (IndexBuilder.() -> Unit)? = {
// Creates a standard index on the 'name' column
createIndex("idx_person_name").on(name)
// Creates a unique composite index on 'email' and 'phone'
createUniqueIndex("uidx_person_email_phone").on(email, phone)
// Creates a partial index for active users
createIndex("idx_active_users")
.on(status)
.where { status eq "active" }
}Content copied to clipboard
Author
MOHAMMAD AZIM ANSARI
Parameters
indexes
A mutable list used internally to collect the created Index definitions.