From c2397536e9b5fc9defabcda896acc417c9484513 Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Wed, 2 Oct 2024 14:22:38 +0200 Subject: [PATCH 1/3] chore!: Change Oracle and H2 Oracle ubyteType from NUMBER(4) to NUMBER(3) to not take up more space than needed as UByte has a maximum of three digits --- documentation-website/Writerside/topics/Breaking-Changes.md | 1 + .../kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation-website/Writerside/topics/Breaking-Changes.md b/documentation-website/Writerside/topics/Breaking-Changes.md index 8845661361..5f8088b052 100644 --- a/documentation-website/Writerside/topics/Breaking-Changes.md +++ b/documentation-website/Writerside/topics/Breaking-Changes.md @@ -3,6 +3,7 @@ ## 0.56.0 * If the `distinct` parameter of `groupConcat()` is set to `true`, when using Oracle or SQL Server, this will now fail early with an `UnsupportedByDialectException`. Previously, the setting would be ignored and SQL function generation would not include a `DISTINCT` clause. +* In Oracle and H2 Oracle, the `ubyte()` column now maps to data type `NUMBER(3)` instead of `NUMBER(4)`. ## 0.55.0 * The `DeleteStatement` property `table` is now deprecated in favor of `targetsSet`, which holds a `ColumnSet` that may be a `Table` or `Join`. diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt index 551ecf8698..ed33a99f38 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt @@ -18,7 +18,7 @@ internal object OracleDataTypeProvider : DataTypeProvider() { } else { "NUMBER(3)" } - override fun ubyteType(): String = "NUMBER(4)" + override fun ubyteType(): String = "NUMBER(3)" override fun shortType(): String = if (currentDialect.h2Mode == H2Dialect.H2CompatibilityMode.Oracle) { "SMALLINT" } else { From 769e240b7b28cf02af20a60abdad189a1db4165a Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Wed, 2 Oct 2024 14:22:49 +0200 Subject: [PATCH 2/3] chore!: Change Oracle and H2 Oracle ushortType from NUMBER(6) to NUMBER(5) to not take up more space than needed as UShort has a maximum of five digits --- documentation-website/Writerside/topics/Breaking-Changes.md | 1 + .../kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/documentation-website/Writerside/topics/Breaking-Changes.md b/documentation-website/Writerside/topics/Breaking-Changes.md index 5f8088b052..cd7b1738b2 100644 --- a/documentation-website/Writerside/topics/Breaking-Changes.md +++ b/documentation-website/Writerside/topics/Breaking-Changes.md @@ -4,6 +4,7 @@ * If the `distinct` parameter of `groupConcat()` is set to `true`, when using Oracle or SQL Server, this will now fail early with an `UnsupportedByDialectException`. Previously, the setting would be ignored and SQL function generation would not include a `DISTINCT` clause. * In Oracle and H2 Oracle, the `ubyte()` column now maps to data type `NUMBER(3)` instead of `NUMBER(4)`. +* In Oracle and H2 Oracle, the `ushort()` column now maps to data type `NUMBER(5)` instead of `NUMBER(6)`. ## 0.55.0 * The `DeleteStatement` property `table` is now deprecated in favor of `targetsSet`, which holds a `ColumnSet` that may be a `Table` or `Join`. diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt index ed33a99f38..9bcca0262d 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt @@ -24,7 +24,7 @@ internal object OracleDataTypeProvider : DataTypeProvider() { } else { "NUMBER(5)" } - override fun ushortType(): String = "NUMBER(6)" + override fun ushortType(): String = "NUMBER(5)" override fun integerType(): String = "NUMBER(12)" override fun integerAutoincType(): String = "NUMBER(12)" override fun uintegerType(): String = "NUMBER(13)" From 04482173fed2f21976ccc06ee7dc7bff4fe18c22 Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Wed, 2 Oct 2024 15:57:58 +0200 Subject: [PATCH 3/3] chore!: Change Oracle and H2 Oracle uintegerType and uintegerAutoincType from NUMBER(13) to NUMBER(10) to not take up more space than needed as UInt has a maximum of ten digits --- documentation-website/Writerside/topics/Breaking-Changes.md | 1 + .../kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation-website/Writerside/topics/Breaking-Changes.md b/documentation-website/Writerside/topics/Breaking-Changes.md index cd7b1738b2..b7464c4773 100644 --- a/documentation-website/Writerside/topics/Breaking-Changes.md +++ b/documentation-website/Writerside/topics/Breaking-Changes.md @@ -5,6 +5,7 @@ `UnsupportedByDialectException`. Previously, the setting would be ignored and SQL function generation would not include a `DISTINCT` clause. * In Oracle and H2 Oracle, the `ubyte()` column now maps to data type `NUMBER(3)` instead of `NUMBER(4)`. * In Oracle and H2 Oracle, the `ushort()` column now maps to data type `NUMBER(5)` instead of `NUMBER(6)`. +* In Oracle and H2 Oracle, the `uinteger()` column now maps to data type `NUMBER(10)` instead of `NUMBER(13)`. ## 0.55.0 * The `DeleteStatement` property `table` is now deprecated in favor of `targetsSet`, which holds a `ColumnSet` that may be a `Table` or `Join`. diff --git a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt index 9bcca0262d..f40c188c77 100644 --- a/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt +++ b/exposed-core/src/main/kotlin/org/jetbrains/exposed/sql/vendors/OracleDialect.kt @@ -27,8 +27,8 @@ internal object OracleDataTypeProvider : DataTypeProvider() { override fun ushortType(): String = "NUMBER(5)" override fun integerType(): String = "NUMBER(12)" override fun integerAutoincType(): String = "NUMBER(12)" - override fun uintegerType(): String = "NUMBER(13)" - override fun uintegerAutoincType(): String = "NUMBER(13)" + override fun uintegerType(): String = "NUMBER(10)" + override fun uintegerAutoincType(): String = "NUMBER(10)" override fun longType(): String = "NUMBER(19)" override fun longAutoincType(): String = "NUMBER(19)" override fun ulongType(): String = "NUMBER(20)"