ForeignKeyConstraint

data class ForeignKeyConstraint(val references: Map<Column<*>, Column<*>>, onUpdate: ReferenceOption?, onDelete: ReferenceOption?, name: String?) : DdlAware

Represents a foreign key constraint.

Constructors

Link copied to clipboard
constructor(target: Column<*>, from: Column<*>, onUpdate: ReferenceOption?, onDelete: ReferenceOption?, name: String?)
constructor(references: Map<Column<*>, Column<*>>, onUpdate: ReferenceOption?, onDelete: ReferenceOption?, name: String?)

Properties

Link copied to clipboard

Custom foreign key name, if provided.

Link copied to clipboard
open val ddl: List<String>

Returns the list of DDL statements that create this DdlAware instance.

Link copied to clipboard

Reference option when performing delete operations.

Link copied to clipboard

Name of this foreign key constraint.

Link copied to clipboard

The foreign key columns of the referencing child table.

Link copied to clipboard

The referencing child table.

Link copied to clipboard

Name of the referencing child table.

Link copied to clipboard

Mapping of the foreign key columns in the referencing child table to their referenced parent table columns.

Link copied to clipboard

The columns of the referenced parent table.

Link copied to clipboard

The referenced parent table.

Link copied to clipboard

Name of the referenced parent table.

Link copied to clipboard

Reference option when performing update operations.

Functions

Link copied to clipboard
open override fun createStatement(): List<String>

Returns the list of DDL statements that create this object.

Link copied to clipboard
open override fun dropStatement(): List<String>

Returns the list of DDL statements that drops this object.

Link copied to clipboard
open override fun modifyStatement(): List<String>

Returns the list of DDL statements that modify this object.

Link copied to clipboard
Link copied to clipboard
fun targetOf(from: Column<*>): Column<*>?

Returns the parent table column that is referenced by the from column in the child table.

Link copied to clipboard
open override fun toString(): String