From becf0537c4babe7b7090b763d9f127342d4df313 Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Wed, 24 May 2023 17:28:27 +0200 Subject: [PATCH] feat: EXPOSED-47 Add support for SET DEFAULT reference option --- .../src/main/kotlin/org/jetbrains/exposed/sql/Constraints.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Constraints.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Constraints.kt index 991ecd97ac..80c45f03e5 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Constraints.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/Constraints.kt @@ -29,7 +29,8 @@ enum class ReferenceOption { CASCADE, SET_NULL, RESTRICT, - NO_ACTION; + NO_ACTION, + SET_DEFAULT; override fun toString(): String = name.replace("_", " ") @@ -40,6 +41,7 @@ enum class ReferenceOption { DatabaseMetaData.importedKeySetNull -> SET_NULL DatabaseMetaData.importedKeyRestrict -> RESTRICT DatabaseMetaData.importedKeyNoAction -> NO_ACTION + DatabaseMetaData.importedKeySetDefault -> SET_DEFAULT else -> currentDialect.defaultReferenceOption } }