initially

abstract fun initially(initially: Initially): Constraint

This corresponds to the INITIALLY clause in a FOREIGN KEY definition.

This determines when the constraint is checked within a transaction.

This clause is only effective if deferrable has been set.

Example

foreignKey(childColumn)
.references(ParentTable.parentColumn)
.deferrable(true)
.initially(Initially.DEFERRED) // Check at transaction commit

Return

The ForeignKeyConstraint instance for further chaining.

Author

MOHAMMAD AZIM ANSARI

Parameters

initially

The initial deferral state, either Initially.DEFERRED (check at commit) or Initially.IMMEDIATE (check after each statement).

See also