index

fun index(isUnique: Boolean = false, vararg columns: Column<*>)

Creates an index.

Parameters

isUnique

Whether the index is unique or not.

columns

Columns that compose the index.


fun index(customIndexName: String? = null, isUnique: Boolean = false, vararg columns: Column<*>, functions: List<ExpressionWithColumnType<*>>? = null, indexType: String? = null, filterCondition: FilterCondition = null)

Creates an index.

Parameters

customIndexName

Name of the index.

isUnique

Whether the index is unique or not.

columns

Columns that compose the index.

functions

Functions that compose the index.

indexType

A custom index type (e.g., "BTREE" or "HASH").

filterCondition

Index filtering conditions (also known as "partial index") declaration.


fun <T> Column<T>.index(customIndexName: String? = null, isUnique: Boolean = false): Column<T>

Creates an index composed by this column only.

Parameters

customIndexName

Name of the index.

isUnique

Whether the index is unique or not.