# ReferenceOption

enum ReferenceOption : Enum<ReferenceOption>

Represents referential actions used by `ON UPDATE` or `ON DELETE` subclauses of a `FOREIGN KEY` constraint clause.

## Entries

CASCADE
Link copied to clipboard
CASCADE

Updates/deletes the referenced parent row, in addition to any rows in the referencing child table.

SET_NULL
Link copied to clipboard
SET_NULL

Updates/deletes the referenced parent row, and sets the column in the referencing child table to `NULL`.

RESTRICT
Link copied to clipboard
RESTRICT

Prevents updating/deleting the referenced parent row.

NO_ACTION
Link copied to clipboard
NO_ACTION

In some, but not all, databases, this action is equivalent to `RESTRICT`. Please check the documentation.

SET_DEFAULT
Link copied to clipboard
SET_DEFAULT

Updates/deletes the referenced parent row, and sets the column in the referencing child table to its default value.

## Properties

entries
Link copied to clipboard
val entries: EnumEntries<ReferenceOption>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int

## Functions

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

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
fun values(): Array<ReferenceOption>

Returns an array containing the constants of this enum type, in the order they're declared.