check

fun <T> Column<T>.check(name: String = "", op: SqlExpressionBuilder.(Column<T>) -> Op<Boolean>): Column<T>

Creates a check constraint in this column.

Parameters

name

The name to identify the constraint, optional. Must be unique (case-insensitive) to this table, otherwise, the constraint will not be created. All names are trimmed, blank names are ignored and the database engine decides the default name.

op

The expression against which the newly inserted values will be compared.


fun check(name: String = "", op: SqlExpressionBuilder.() -> Op<Boolean>)

Creates a check constraint in this table.

Parameters

name

The name to identify the constraint, optional. Must be unique (case-insensitive) to this table, otherwise, the constraint will not be created. All names are trimmed, blank names are ignored and the database engine decides the default name.

op

The expression against which the newly inserted values will be compared.