From 6bae2f33b609137f5cb9c4f15d84f484d68bd019 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 14 Sep 2022 18:18:17 +0530 Subject: [PATCH 01/30] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 8 ++++---- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 2197cc96..08d13c28 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "sql" -version = "1.5.0" +version = "1.5.1" authors = ["Ballerina"] keywords = ["database", "client", "network", "SQL", "RDBMS"] repository = "https://github.com/ballerina-platform/module-ballerina-sql" @@ -12,11 +12,11 @@ distribution = "2201.2.0" [[platform.java11.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" -version = "1.5.0" -path = "../native/build/libs/sql-native-1.5.0.jar" +version = "1.5.1" +path = "../native/build/libs/sql-native-1.5.1-SNAPSHOT.jar" [[platform.java11.dependency]] -path = "../test-utils/build/libs/sql-test-utils-1.5.0.jar" +path = "../test-utils/build/libs/sql-test-utils-1.5.1-SNAPSHOT.jar" scope = "testOnly" [[platform.java11.dependency]] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index bbd97688..dcf1a87f 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "sql-compiler-plugin" class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.5.0.jar" +path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.5.1-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index e3c82002..b236dbdd 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -290,7 +290,7 @@ dependencies = [ [[package]] org = "ballerina" name = "sql" -version = "1.5.0" +version = "1.5.1" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, From 248345932f7f5d118967521d20dd2edbfeec210a Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Tue, 25 Oct 2022 11:25:45 +0530 Subject: [PATCH 02/30] [Automated] Update native jar versions in toml files --- ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index b236dbdd..4801d5b4 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -225,7 +225,7 @@ dependencies = [ [[package]] org = "ballerina" name = "log" -version = "2.4.0" +version = "2.4.1" scope = "testOnly" dependencies = [ {org = "ballerina", name = "io"}, From 6a6f25cae161ec1389ec920187820b4e501af56f Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Thu, 23 Feb 2023 21:30:17 +0530 Subject: [PATCH 03/30] [Automated] Update native jar versions in toml files --- ballerina/Dependencies.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 4801d5b4..40253d00 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -34,7 +34,7 @@ dependencies = [ [[package]] org = "ballerina" name = "constraint" -version = "1.0.0" +version = "1.0.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -99,7 +99,7 @@ dependencies = [ [[package]] org = "ballerina" name = "io" -version = "1.3.0" +version = "1.3.1" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} @@ -261,7 +261,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.0.5" +version = "1.0.6" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -280,7 +280,7 @@ dependencies = [ [[package]] org = "ballerina" name = "regex" -version = "1.3.0" +version = "1.3.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, From e03d15a7ae082133a6fabb5a924f5ae0a8a12045 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 20 Sep 2023 11:44:30 +0530 Subject: [PATCH 04/30] [Automated] Update native jar versions in toml files --- ballerina/Dependencies.toml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 13debdb1..c6ea8edd 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.8.0-20230726-145300-b2bdf796" +distribution-version = "2201.8.0-20230908-135700-74a59dff" [[package]] org = "ballerina" @@ -99,11 +99,13 @@ dependencies = [ org = "ballerina" name = "io" version = "1.6.0" -scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} ] +modules = [ + {org = "ballerina", packageName = "io", moduleName = "io"} +] [[package]] org = "ballerina" @@ -235,7 +237,6 @@ modules = [ org = "ballerina" name = "lang.value" version = "0.0.0" -scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -302,12 +303,14 @@ name = "sql" version = "1.11.0" dependencies = [ {org = "ballerina", name = "file"}, + {org = "ballerina", name = "io"}, {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.object"}, {org = "ballerina", name = "lang.runtime"}, {org = "ballerina", name = "lang.string"}, {org = "ballerina", name = "lang.transaction"}, {org = "ballerina", name = "test"}, + {org = "ballerina", name = "time"}, {org = "ballerinai", name = "transaction"} ] modules = [ @@ -341,10 +344,12 @@ modules = [ org = "ballerina" name = "time" version = "2.4.0" -scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] +modules = [ + {org = "ballerina", packageName = "time", moduleName = "time"} +] [[package]] org = "ballerina" From 0b6ed1048e67128d53cc2bb3daea9ab9804b74d6 Mon Sep 17 00:00:00 2001 From: vil02 Date: Fri, 13 Oct 2023 16:48:03 +0200 Subject: [PATCH 05/30] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 8 ++++---- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index f823c2c6..ce6d5ff9 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "sql" -version = "1.11.0" +version = "1.11.1" authors = ["Ballerina"] keywords = ["database", "client", "network", "SQL", "RDBMS"] repository = "https://github.com/ballerina-platform/module-ballerina-sql" @@ -15,11 +15,11 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" -version = "1.11.0" -path = "../native/build/libs/sql-native-1.11.0.jar" +version = "1.11.1" +path = "../native/build/libs/sql-native-1.11.1-SNAPSHOT.jar" [[platform.java17.dependency]] -path = "../test-utils/build/libs/sql-test-utils-1.11.0.jar" +path = "../test-utils/build/libs/sql-test-utils-1.11.1-SNAPSHOT.jar" scope = "testOnly" [[platform.java17.dependency]] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 2dfd28cb..3f494b01 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "sql-compiler-plugin" class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.11.0.jar" +path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.11.1-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index d47a2a70..3abbb77e 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.0" +version = "2.10.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -300,7 +300,7 @@ dependencies = [ [[package]] org = "ballerina" name = "sql" -version = "1.11.0" +version = "1.11.1" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, From 70b65bcafba02a06ec1aa959042c53a130fbdba2 Mon Sep 17 00:00:00 2001 From: vil02 Date: Fri, 13 Oct 2023 16:58:22 +0200 Subject: [PATCH 06/30] Make some Java classes proper utilities Made the design cleaner by marking Java classes as `final` and explicitly declaring their default constructors as `private`. This change makes the code coverage reports more accurate. Closes #4921. --- changelog.md | 1 + .../ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java | 4 ++-- .../io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java | 4 ++-- native/src/test/java/io/ballerina/stdlib/sql/TestUtils.java | 4 +++- .../io/ballerina/stdlib/sql/testutils/nativeimpl/Exec.java | 4 +++- .../ballerina/stdlib/sql/testutils/nativeimpl/ExitCode.java | 4 +++- .../stdlib/sql/testutils/nativeimpl/WaitForExit.java | 4 +++- .../java/io/ballerina/stdlib/sql/testutils/utils/OSUtils.java | 4 +++- 8 files changed, 20 insertions(+), 9 deletions(-) diff --git a/changelog.md b/changelog.md index 58c29783..32eee4e9 100644 --- a/changelog.md +++ b/changelog.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - [Support retrieval of enum types](https://github.com/ballerina-platform/ballerina-standard-library/issues/4588) +- [Make some of the Java classes proper utility classes](https://github.com/ballerina-platform/ballerina-standard-library/issues/4921) ## [1.9.0] - 2023-06-01 diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java index 6d4b6012..315ef510 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java @@ -51,8 +51,8 @@ /** * This class provides functionality for the `ProcedureCallResult` to iterate through the sql result sets. */ -public class ProcedureCallResultUtils { - public ProcedureCallResultUtils() { +public final class ProcedureCallResultUtils { + private ProcedureCallResultUtils() { } public static Object getNextQueryResult(BObject procedureCallResult) { diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java index dc427664..1942b70b 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java @@ -36,8 +36,8 @@ * * @since 1.2.0 */ -public class RecordIteratorUtils { - public RecordIteratorUtils() { +public final class RecordIteratorUtils { + private RecordIteratorUtils() { } public static Object nextResult(BObject recordIterator) { diff --git a/native/src/test/java/io/ballerina/stdlib/sql/TestUtils.java b/native/src/test/java/io/ballerina/stdlib/sql/TestUtils.java index 1eedca47..34735d6c 100644 --- a/native/src/test/java/io/ballerina/stdlib/sql/TestUtils.java +++ b/native/src/test/java/io/ballerina/stdlib/sql/TestUtils.java @@ -73,7 +73,9 @@ /** * TestUtils class for testing ballerina native classes/methods. */ -public class TestUtils { +public final class TestUtils { + + private TestUtils() {} /** * ExtendedColumnDefinition Class for test utils. diff --git a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/Exec.java b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/Exec.java index 56d97902..b08a79d3 100644 --- a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/Exec.java +++ b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/Exec.java @@ -36,7 +36,9 @@ * * @since 0.6.0 */ -public class Exec { +public final class Exec { + + private Exec() {} public static Object exec(BString command, BMap env, Object dir, BString[] args) { List commandList = new ArrayList<>(); diff --git a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/ExitCode.java b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/ExitCode.java index 689a9594..350aebee 100644 --- a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/ExitCode.java +++ b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/ExitCode.java @@ -27,7 +27,9 @@ * * @since 0.6.0 */ -public class ExitCode { +public final class ExitCode { + + private ExitCode() {} public static Object exitCode(BObject objVal) { Process process = OSUtils.processFromObject(objVal); diff --git a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/WaitForExit.java b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/WaitForExit.java index 3329c99a..7c9c8fb1 100644 --- a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/WaitForExit.java +++ b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/nativeimpl/WaitForExit.java @@ -27,7 +27,9 @@ * * @since 0.6.0 */ -public class WaitForExit { +public final class WaitForExit { + + private WaitForExit() {} public static Object waitForExit(BObject objVal) { Process process = OSUtils.processFromObject(objVal); diff --git a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/utils/OSUtils.java b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/utils/OSUtils.java index aea008f9..4df69838 100644 --- a/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/utils/OSUtils.java +++ b/test-utils/src/main/java/io/ballerina/stdlib/sql/testutils/utils/OSUtils.java @@ -30,7 +30,9 @@ /** * @since 0.6.0 */ -public class OSUtils { +public final class OSUtils { + + private OSUtils() {} private static final BString UNKNOWN_MESSAGE = StringUtils.fromString("Unknown Error"); From 99c1d8618e58e2cc34b79c617a72279892b990bd Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Mon, 11 Dec 2023 16:49:18 +0530 Subject: [PATCH 07/30] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 8 ++++---- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 6aa1f059..d31ae2fc 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "sql" -version = "1.11.1" +version = "1.11.2" authors = ["Ballerina"] keywords = ["database", "client", "network", "SQL", "RDBMS"] repository = "https://github.com/ballerina-platform/module-ballerina-sql" @@ -15,11 +15,11 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" -version = "1.11.1" -path = "../native/build/libs/sql-native-1.11.1.jar" +version = "1.11.2" +path = "../native/build/libs/sql-native-1.11.2-SNAPSHOT.jar" [[platform.java17.dependency]] -path = "../test-utils/build/libs/sql-test-utils-1.11.1.jar" +path = "../test-utils/build/libs/sql-test-utils-1.11.2-SNAPSHOT.jar" scope = "testOnly" [[platform.java17.dependency]] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index d27b59f7..c8b0a2cc 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "sql-compiler-plugin" class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.11.1.jar" +path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.11.2-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 136d61c7..3e7adf48 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.8.0" +distribution-version = "2201.9.0-20231211-150600-888c06e1" [[package]] org = "ballerina" @@ -35,7 +35,7 @@ dependencies = [ [[package]] org = "ballerina" name = "constraint" -version = "1.4.0" +version = "1.5.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.0" +version = "2.10.5" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -111,6 +111,7 @@ modules = [ org = "ballerina" name = "jballerina.java" version = "0.0.0" +scope = "testOnly" modules = [ {org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"} ] @@ -300,7 +301,7 @@ dependencies = [ [[package]] org = "ballerina" name = "sql" -version = "1.11.1" +version = "1.11.2" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, From c6e968369baa57dc1567105df5eeec567412ffe4 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 21 Feb 2024 14:24:40 +0530 Subject: [PATCH 08/30] Add Ref Cursor support for the procedure call --- ballerina/types.bal | 15 ++++++++- .../io/ballerina/stdlib/sql/Constants.java | 1 + .../stdlib/sql/nativeimpl/CallProcessor.java | 4 +++ .../sql/nativeimpl/OutParameterProcessor.java | 15 +++++++++ .../stdlib/sql/nativeimpl/QueryProcessor.java | 13 +------- .../AbstractResultParameterProcessor.java | 4 +++ .../DefaultResultParameterProcessor.java | 31 +++++++++++++++++++ .../io/ballerina/stdlib/sql/utils/Utils.java | 13 ++++++++ 8 files changed, 83 insertions(+), 13 deletions(-) diff --git a/ballerina/types.bal b/ballerina/types.bal index 9142a5b7..4020e5f0 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -1321,6 +1321,19 @@ public distinct class XMLOutParameter { } external; } +# Represents the generic OUT Cursor Parameters in `sql:ParameterizedCallQuery`. +public class CursorOutParameter { + + # Parses returned SQL result set values to a ballerina stream value. + # + # + typeDesc - The `typedesc` of the record to which the result needs to be returned + # + return - Stream of records in the `rowType` type + public isolated function get(typedesc rowType = <>) returns stream = @java:Method { + 'class: "io.ballerina.stdlib.sql.nativeimpl.OutParameterProcessor", + name: "getOutCursorValue" + } external; +}; + # Represents SQL InOutParameter in `sql:ParameterizedCallQuery`. public class InOutParameter { Value 'in; @@ -1340,7 +1353,7 @@ public class InOutParameter { } # Generic type that can be passed to `sql:ParameterizedCallQuery` to indicate procedure/function parameters. -public type Parameter Value|InOutParameter|OutParameter; +public type Parameter Value|InOutParameter|OutParameter|CursorOutParameter; # The object constructed through backtick surrounded strings. Dynamic parameters of `sql:Parameter` type can be indicated using `${}` # such as `` `The sql:ParameterizedQuery is ${variable_name}` ``. diff --git a/native/src/main/java/io/ballerina/stdlib/sql/Constants.java b/native/src/main/java/io/ballerina/stdlib/sql/Constants.java index 92dfeaf7..1c7c1b4e 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/Constants.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/Constants.java @@ -297,6 +297,7 @@ private OutParameterTypes() { public static final String BOOLEAN = "BooleanOutParameter"; public static final String BOOLEAN_ARRAY = "BooleanArrayOutParameter"; public static final String REF = "RefOutParameter"; + public static final String REF_CURSOR = "CursorOutParameter"; public static final String STRUCT = "StructOutParameter"; public static final String XML = "XMLOutParameter"; } diff --git a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java index 17d8d70a..b0e5067f 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java @@ -334,6 +334,7 @@ private static void populateOutParameters(CallableStatement statement, BObject p result = resultParameterProcessor.processBoolean(statement, paramIndex); break; case Types.REF: + case Types.REF_CURSOR: result = resultParameterProcessor.processRef(statement, paramIndex); break; case Types.STRUCT: @@ -462,6 +463,9 @@ private static int getOutParameterType(BObject typedValue, case Constants.OutParameterTypes.REF: sqlTypeValue = Types.REF; break; + case Constants.OutParameterTypes.REF_CURSOR: + sqlTypeValue = Types.REF_CURSOR; + break; case Constants.OutParameterTypes.STRUCT: sqlTypeValue = Types.STRUCT; break; diff --git a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java index 9c711302..6871a8a8 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessor.java @@ -19,9 +19,11 @@ package io.ballerina.stdlib.sql.nativeimpl; import io.ballerina.runtime.api.TypeTags; +import io.ballerina.runtime.api.types.RecordType; import io.ballerina.runtime.api.types.Type; import io.ballerina.runtime.api.utils.TypeUtils; import io.ballerina.runtime.api.values.BObject; +import io.ballerina.runtime.api.values.BStream; import io.ballerina.runtime.api.values.BTypedesc; import io.ballerina.stdlib.sql.Constants; import io.ballerina.stdlib.sql.exception.ApplicationError; @@ -35,6 +37,7 @@ import java.sql.Clob; import java.sql.Date; import java.sql.NClob; +import java.sql.ResultSet; import java.sql.RowId; import java.sql.SQLException; import java.sql.SQLXML; @@ -61,10 +64,22 @@ public static Object getOutParameterValue(BObject result, BTypedesc typeDesc) { return get(result, typeDesc, DefaultResultParameterProcessor.getInstance(), "OutParameter"); } + public static BStream getOutCursorValue(BObject result, BTypedesc typeDesc) { + return get(result, typeDesc, DefaultResultParameterProcessor.getInstance()); + } + public static Object getInOutParameterValue(BObject result, BTypedesc typeDesc) { return get(result, typeDesc, DefaultResultParameterProcessor.getInstance(), "InOutParameter"); } + public static BStream get(BObject result, Object recordType, + AbstractResultParameterProcessor resultParameterProcessor) { + Object value = result.getNativeData(Constants.ParameterObject.VALUE_NATIVE_DATA); + RecordType streamConstraint = (RecordType) TypeUtils.getReferredType( + ((BTypedesc) recordType).getDescribingType()); + return resultParameterProcessor.convertCursorValue((ResultSet) value, streamConstraint); + } + public static Object get(BObject result, BTypedesc typeDesc, AbstractResultParameterProcessor resultParameterProcessor, String parameterType) { int sqlType = (int) result.getNativeData(Constants.ParameterObject.SQL_TYPE_NATIVE_DATA); diff --git a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/QueryProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/QueryProcessor.java index b3662195..441c943d 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/QueryProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/QueryProcessor.java @@ -44,7 +44,6 @@ import io.ballerina.stdlib.sql.parameterprocessor.AbstractStatementParameterProcessor; import io.ballerina.stdlib.sql.utils.ColumnDefinition; import io.ballerina.stdlib.sql.utils.ErrorGenerator; -import io.ballerina.stdlib.sql.utils.ModuleUtils; import io.ballerina.stdlib.sql.utils.PrimitiveTypeColumnDefinition; import io.ballerina.stdlib.sql.utils.Utils; @@ -55,6 +54,7 @@ import java.util.List; import static io.ballerina.stdlib.sql.datasource.SQLWorkerThreadPool.SQL_EXECUTOR_SERVICE; +import static io.ballerina.stdlib.sql.utils.Utils.getErrorStream; /** * This class provides the query processing implementation which executes sql queries. @@ -266,17 +266,6 @@ private static Object getRecordOrPrimitiveTypeBValue( return createValue(resultSet, 1, definition, resultParameterProcessor); } - private static BStream getErrorStream(Object recordType, BError errorValue) { - return ValueCreator.createStreamValue( - TypeCreator.createStreamType(((BTypedesc) recordType).getDescribingType(), - PredefinedTypes.TYPE_NULL), createRecordIterator(errorValue)); - } - - private static BObject createRecordIterator(BError errorValue) { - return ValueCreator.createObjectValue(ModuleUtils.getModule(), Constants.RESULT_ITERATOR_OBJECT, - errorValue, null); - } - public static BMap createRecord(ResultSet resultSet, List columnDefinitions, RecordType recordConstraint, AbstractResultParameterProcessor resultParameterProcessor) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractResultParameterProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractResultParameterProcessor.java index 1a5cd68c..8edd7307 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractResultParameterProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractResultParameterProcessor.java @@ -19,12 +19,14 @@ import io.ballerina.runtime.api.creators.ValueCreator; import io.ballerina.runtime.api.types.Field; +import io.ballerina.runtime.api.types.RecordType; import io.ballerina.runtime.api.types.StructureType; import io.ballerina.runtime.api.types.Type; import io.ballerina.runtime.api.utils.JsonUtils; import io.ballerina.runtime.api.values.BArray; import io.ballerina.runtime.api.values.BError; import io.ballerina.runtime.api.values.BObject; +import io.ballerina.runtime.api.values.BStream; import io.ballerina.runtime.api.values.BString; import io.ballerina.stdlib.sql.Constants; import io.ballerina.stdlib.sql.exception.ConversionError; @@ -116,6 +118,8 @@ public abstract Object convertBoolean(boolean value, int sqlType, Type type, boo public abstract Object convertStruct(Struct value, int sqlType, Type type) throws DataError, SQLException; + public abstract BStream convertCursorValue(ResultSet value, RecordType recordType); + public abstract Object convertXml(SQLXML value, int sqlType, Type type) throws DataError, SQLException; public abstract Object convertCustomOutParameter(Object value, String outParamObjectName, int sqlType, diff --git a/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/DefaultResultParameterProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/DefaultResultParameterProcessor.java index ea1ce022..0220dd30 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/DefaultResultParameterProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/DefaultResultParameterProcessor.java @@ -30,15 +30,21 @@ import io.ballerina.runtime.api.utils.TypeUtils; import io.ballerina.runtime.api.utils.XmlUtils; import io.ballerina.runtime.api.values.BArray; +import io.ballerina.runtime.api.values.BError; import io.ballerina.runtime.api.values.BMap; import io.ballerina.runtime.api.values.BObject; +import io.ballerina.runtime.api.values.BStream; import io.ballerina.runtime.api.values.BString; import io.ballerina.runtime.api.values.BXml; import io.ballerina.stdlib.sql.Constants; +import io.ballerina.stdlib.sql.exception.ApplicationError; import io.ballerina.stdlib.sql.exception.DataError; import io.ballerina.stdlib.sql.exception.FieldMismatchError; import io.ballerina.stdlib.sql.exception.TypeMismatchError; import io.ballerina.stdlib.sql.exception.UnsupportedTypeError; +import io.ballerina.stdlib.sql.utils.ColumnDefinition; +import io.ballerina.stdlib.sql.utils.ErrorGenerator; +import io.ballerina.stdlib.sql.utils.ModuleUtils; import io.ballerina.stdlib.sql.utils.PrimitiveTypeColumnDefinition; import io.ballerina.stdlib.sql.utils.Utils; @@ -62,6 +68,7 @@ import java.util.List; import static io.ballerina.runtime.api.utils.StringUtils.fromString; +import static io.ballerina.stdlib.sql.utils.Utils.getErrorStream; /** * This class implements methods required convert SQL types into ballerina types and @@ -325,6 +332,30 @@ protected BMap createUserDefinedType(Struct structValue, Struct return struct; } + public BStream convertCursorValue(ResultSet resultSet, RecordType streamConstraint) { + if (resultSet == null) { + return null; + } + try { + List columnDefinitions = Utils.getColumnDefinitions(resultSet, streamConstraint); + BObject resultIterator = ValueCreator.createObjectValue(ModuleUtils.getModule(), + Constants.RESULT_ITERATOR_OBJECT, null, getBalStreamResultIterator()); + resultIterator.addNativeData(Constants.RESULT_SET_NATIVE_DATA_FIELD, resultSet); + resultIterator.addNativeData(Constants.COLUMN_DEFINITIONS_DATA_FIELD, columnDefinitions); + resultIterator.addNativeData(Constants.RECORD_TYPE_DATA_FIELD, streamConstraint); + return ValueCreator.createStreamValue(TypeCreator.createStreamType(streamConstraint, + PredefinedTypes.TYPE_NULL), + resultIterator); + } catch (ApplicationError applicationError) { + BError errorValue = ErrorGenerator.getSQLApplicationError(applicationError); + return getErrorStream(streamConstraint, errorValue); + } catch (SQLException sqlException) { + BError errorValue = ErrorGenerator.getSQLDatabaseError(sqlException, + "Error while retrieving column definition from result set."); + return getErrorStream(streamConstraint, errorValue); + } + } + @Override protected void createUserDefinedTypeSubtype(Field internalField, StructureType structType) throws DataError { diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/Utils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/Utils.java index c7ba4d4d..019ce43c 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/Utils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/Utils.java @@ -37,7 +37,9 @@ import io.ballerina.runtime.api.values.BMap; import io.ballerina.runtime.api.values.BMapInitialValueEntry; import io.ballerina.runtime.api.values.BObject; +import io.ballerina.runtime.api.values.BStream; import io.ballerina.runtime.api.values.BString; +import io.ballerina.runtime.api.values.BTypedesc; import io.ballerina.runtime.api.values.BValue; import io.ballerina.runtime.transactions.TransactionResourceManager; import io.ballerina.stdlib.sql.Constants; @@ -1374,4 +1376,15 @@ public static void disableHikariLogs() { } } } + + public static BStream getErrorStream(Object recordType, BError errorValue) { + return ValueCreator.createStreamValue( + TypeCreator.createStreamType(((BTypedesc) recordType).getDescribingType(), + PredefinedTypes.TYPE_NULL), createRecordIterator(errorValue)); + } + + private static BObject createRecordIterator(BError errorValue) { + return ValueCreator.createObjectValue(ModuleUtils.getModule(), Constants.RESULT_ITERATOR_OBJECT, + errorValue, null); + } } From 736eccacfd48d1faebefe99cf39d5a171f39a6c5 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 21 Feb 2024 15:41:11 +0530 Subject: [PATCH 09/30] Change the spec to add new out parameter --- ballerina/types.bal | 2 +- changelog.md | 1 + docs/spec/spec.md | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ballerina/types.bal b/ballerina/types.bal index 4020e5f0..2ecff877 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -1321,7 +1321,7 @@ public distinct class XMLOutParameter { } external; } -# Represents the generic OUT Cursor Parameters in `sql:ParameterizedCallQuery`. +# Represents the Cursor Out Parameters in `sql:ParameterizedCallQuery`. public class CursorOutParameter { # Parses returned SQL result set values to a ballerina stream value. diff --git a/changelog.md b/changelog.md index aaa2eb2c..d16211c1 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- Support for Cursor based result set retrieval in procedure calls ### Changed - [Revert Accept escaped backtick as insertions in parameterised query](https://github.com/ballerina-platform/ballerina-standard-library/issues/2056) diff --git a/docs/spec/spec.md b/docs/spec/spec.md index 7a2b4cea..d68946f1 100644 --- a/docs/spec/spec.md +++ b/docs/spec/spec.md @@ -240,6 +240,24 @@ These types can be used to retrieve values from SQL stored procedures using the ``` Type of the returned value is inferred from LHS of the expression. +In addition to the above parameters, it has `CursorOutParameter` to retrieve the result set from the SQL stored procedure. + + ```ballerina + # Parses returned SQL result set values to a ballerina stream value. + # + # + typeDesc - The `typedesc` of the record to which the result needs to be returned + # + return - Stream of records in the `rowType` type + public isolated function get(typedesc typeDesc = <>) returns stream; + ``` + + ```ballerina + CursorOutParameter cursor = new; + + // Execute the DB call method + + stream resultStream = cursor.get(); + ``` + ## 3.3. Query concatenation `sql:ParameterizedQuery` can be concatenated using util methods such as `sql:queryConcat()` and From 22d315d3d4881078bea5aca8a55e91b067b7b941 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 21 Feb 2024 16:08:43 +0530 Subject: [PATCH 10/30] Update ballerina/Dependencies.toml --- ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 3e7adf48..debcc15f 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.9.0-20231211-150600-888c06e1" +distribution-version = "2201.8.0 [[package]] org = "ballerina" From 0183d8ec5dde4a43d30d06a217222cfcded9fb1d Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 21 Feb 2024 16:08:57 +0530 Subject: [PATCH 11/30] Update ballerina/Dependencies.toml --- ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index debcc15f..2c1c4283 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.8.0 +distribution-version = "2201.8.0" [[package]] org = "ballerina" From 4c4352e2437820a600aa5e3dcfe55f58e5d60242 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Thu, 22 Feb 2024 11:54:50 +0530 Subject: [PATCH 12/30] [Automated] Update native jar versions in toml files --- ballerina/Dependencies.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 3e7adf48..4877c40f 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.9.0-20231211-150600-888c06e1" +distribution-version = "2201.8.0" [[package]] org = "ballerina" @@ -23,7 +23,7 @@ dependencies = [ [[package]] org = "ballerina" name = "cache" -version = "3.7.0" +version = "3.7.1" scope = "testOnly" dependencies = [ {org = "ballerina", name = "constraint"}, @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.5" +version = "2.10.6" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -282,7 +282,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.2.0" +version = "1.2.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -345,6 +345,7 @@ modules = [ org = "ballerina" name = "time" version = "2.4.0" +scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] From cbb7a2d97f2a8aad411e4a91a9e2627ea02db70d Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Thu, 22 Feb 2024 15:37:44 +0530 Subject: [PATCH 13/30] Add logic to clean up the resultset along with proc result close --- .../main/java/io/ballerina/stdlib/sql/Constants.java | 1 + .../stdlib/sql/nativeimpl/CallProcessor.java | 7 +++++-- .../stdlib/sql/utils/ProcedureCallResultUtils.java | 11 +++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/Constants.java b/native/src/main/java/io/ballerina/stdlib/sql/Constants.java index 1c7c1b4e..71cbad2d 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/Constants.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/Constants.java @@ -56,6 +56,7 @@ private Constants() { public static final String STATEMENT_NATIVE_DATA_FIELD = "Statement"; public static final String COLUMN_DEFINITIONS_DATA_FIELD = "ColumnDefinition"; public static final String RECORD_TYPE_DATA_FIELD = "recordType"; + public static final String REF_CURSOR_VALUE_NATIVE_DATA = "RefCursorValue"; public static final String PROCEDURE_CALL_RESULT = "ProcedureCallResult"; public static final String TYPE_DESCRIPTIONS_NATIVE_DATA_FIELD = "TypeDescription"; diff --git a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java index b0e5067f..7ca42d4d 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java @@ -159,7 +159,7 @@ private static Object nativeCallExecutable(BObject client, BObject paramSQLStrin } populateOutParameters(statement, paramSQLString, outputParamTypes, - resultParameterProcessor); + resultParameterProcessor, procedureCallResult); procedureCallResult.addNativeData(STATEMENT_NATIVE_DATA_FIELD, statement); procedureCallResult.addNativeData(CONNECTION_NATIVE_DATA_FIELD, connection); @@ -227,7 +227,8 @@ private static void setCallParameters(Connection connection, CallableStatement s private static void populateOutParameters(CallableStatement statement, BObject paramSQLString, HashMap outputParamTypes, - AbstractResultParameterProcessor resultParameterProcessor) + AbstractResultParameterProcessor resultParameterProcessor, + BObject procedureCallResult) throws SQLException, ApplicationError { if (outputParamTypes.size() == 0) { return; @@ -336,6 +337,8 @@ private static void populateOutParameters(CallableStatement statement, BObject p case Types.REF: case Types.REF_CURSOR: result = resultParameterProcessor.processRef(statement, paramIndex); + // This is to clean up the result set attached to the ref cursor out parameter when procedure call result is closed. + procedureCallResult.addNativeData(Constants.REF_CURSOR_VALUE_NATIVE_DATA, result); break; case Types.STRUCT: result = resultParameterProcessor.processStruct(statement, paramIndex); diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java index 6d4b6012..69255e93 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java @@ -114,6 +114,17 @@ public static Object getNextQueryResult( public static Object closeCallResult(BObject procedureCallResult) { Statement statement = (Statement) procedureCallResult.getNativeData(Constants.STATEMENT_NATIVE_DATA_FIELD); Connection connection = (Connection) procedureCallResult.getNativeData(Constants.CONNECTION_NATIVE_DATA_FIELD); + // This is to clean up the result set attached to the ref cursor out parameter. + // This is to avoid the result set to be open after the call result is closed. + Object resultSet = procedureCallResult.getNativeData(Constants.REF_CURSOR_VALUE_NATIVE_DATA); + if (resultSet instanceof ResultSet) { + try { + ((ResultSet) resultSet).close(); + procedureCallResult.addNativeData(Constants.REF_CURSOR_VALUE_NATIVE_DATA, null); + } catch (SQLException e) { + return ErrorGenerator.getSQLDatabaseError(e, "Error when closing the result set."); + } + } return cleanUpConnection(procedureCallResult, null, statement, connection); } } From 750a77ce17dcf17ad36ef9040beda9527ed51d06 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Thu, 22 Feb 2024 16:49:03 +0530 Subject: [PATCH 14/30] fix checkstyle issue --- .../java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java index 7ca42d4d..1ec68153 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/nativeimpl/CallProcessor.java @@ -337,7 +337,8 @@ private static void populateOutParameters(CallableStatement statement, BObject p case Types.REF: case Types.REF_CURSOR: result = resultParameterProcessor.processRef(statement, paramIndex); - // This is to clean up the result set attached to the ref cursor out parameter when procedure call result is closed. + // This is to clean up the result set attached to the ref cursor out parameter + // when procedure call result is closed. procedureCallResult.addNativeData(Constants.REF_CURSOR_VALUE_NATIVE_DATA, result); break; case Types.STRUCT: From adf72438dcb660fe0b61985292203818048166c3 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Thu, 22 Feb 2024 21:51:55 +0530 Subject: [PATCH 15/30] Update native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java --- .../io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java index 315ef510..4dee81b2 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java @@ -51,7 +51,7 @@ /** * This class provides functionality for the `ProcedureCallResult` to iterate through the sql result sets. */ -public final class ProcedureCallResultUtils { +public class ProcedureCallResultUtils { private ProcedureCallResultUtils() { } From 763c92f35f9a1b623d42ff864a95181bad250e04 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Thu, 22 Feb 2024 21:52:08 +0530 Subject: [PATCH 16/30] Update native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java --- .../java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java index 1942b70b..b4aaabfa 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java @@ -36,7 +36,7 @@ * * @since 1.2.0 */ -public final class RecordIteratorUtils { +public class RecordIteratorUtils { private RecordIteratorUtils() { } From c82fa655dbba6e3048381f5821f173ce89d3227b Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Sun, 25 Feb 2024 07:17:41 +0530 Subject: [PATCH 17/30] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 8 ++++---- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index d31ae2fc..53a5d4e2 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "sql" -version = "1.11.2" +version = "1.12.0" authors = ["Ballerina"] keywords = ["database", "client", "network", "SQL", "RDBMS"] repository = "https://github.com/ballerina-platform/module-ballerina-sql" @@ -15,11 +15,11 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" -version = "1.11.2" -path = "../native/build/libs/sql-native-1.11.2-SNAPSHOT.jar" +version = "1.12.0" +path = "../native/build/libs/sql-native-1.12.0-SNAPSHOT.jar" [[platform.java17.dependency]] -path = "../test-utils/build/libs/sql-test-utils-1.11.2-SNAPSHOT.jar" +path = "../test-utils/build/libs/sql-test-utils-1.12.0-SNAPSHOT.jar" scope = "testOnly" [[platform.java17.dependency]] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index c8b0a2cc..7e9ed6e0 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "sql-compiler-plugin" class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.11.2-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.12.0-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 4877c40f..439d32bd 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -301,7 +301,7 @@ dependencies = [ [[package]] org = "ballerina" name = "sql" -version = "1.11.2" +version = "1.12.0" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, From 0103466f58e9d1be13b3760a1ad1c1ad5cfa1f78 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Sun, 25 Feb 2024 07:26:09 +0530 Subject: [PATCH 18/30] Update the sql version to the next minor --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 79e5ebee..c43443a7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.ballerina.stdlib -version=1.11.2-SNAPSHOT +version=1.12.0-SNAPSHOT puppycrawlCheckstyleVersion=10.12.1 hikkariLibVersion=3.3.1 From 327451d7f0f0ee3b0ad7add3cb5a0648857202a8 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Sun, 25 Feb 2024 12:15:03 +0530 Subject: [PATCH 19/30] Add unit testcase for the cursor out parameter --- .../stdlib/sql/utils/ProcedureCallResultUtils.java | 2 +- .../stdlib/sql/utils/RecordIteratorUtils.java | 2 +- .../sql/nativeimpl/OutParameterProcessorTest.java | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java index 1bbb6ce3..69255e93 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/ProcedureCallResultUtils.java @@ -52,7 +52,7 @@ * This class provides functionality for the `ProcedureCallResult` to iterate through the sql result sets. */ public class ProcedureCallResultUtils { - private ProcedureCallResultUtils() { + public ProcedureCallResultUtils() { } public static Object getNextQueryResult(BObject procedureCallResult) { diff --git a/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java b/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java index b4aaabfa..dc427664 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/utils/RecordIteratorUtils.java @@ -37,7 +37,7 @@ * @since 1.2.0 */ public class RecordIteratorUtils { - private RecordIteratorUtils() { + public RecordIteratorUtils() { } public static Object nextResult(BObject recordIterator) { diff --git a/native/src/test/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessorTest.java b/native/src/test/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessorTest.java index 7927b680..fd82dba4 100644 --- a/native/src/test/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessorTest.java +++ b/native/src/test/java/io/ballerina/stdlib/sql/nativeimpl/OutParameterProcessorTest.java @@ -89,4 +89,14 @@ void getStructTest() { BMap map = (BMap) obj; assertEquals(map.get(fromString("value1")), false); } + + @Test + void getRefCursorTest() { + BObject object = TestUtils.getMockObject("REF_CURSOR"); + object.addNativeData(Constants.ParameterObject.SQL_TYPE_NATIVE_DATA, 2012); + object.addNativeData(Constants.ParameterObject.VALUE_NATIVE_DATA, null); + + assertNull(OutParameterProcessor.get(object, TestUtils.getBTypedesc(TestUtils.getStringStructRecord()), + DefaultResultParameterProcessor.getInstance())); + } } From 1d9e062789134935862033296a143c3844e26e9c Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Sun, 25 Feb 2024 18:58:07 +0530 Subject: [PATCH 20/30] Fix API Docs --- ballerina/types.bal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/types.bal b/ballerina/types.bal index 2ecff877..3e4ba0d6 100644 --- a/ballerina/types.bal +++ b/ballerina/types.bal @@ -1326,7 +1326,7 @@ public class CursorOutParameter { # Parses returned SQL result set values to a ballerina stream value. # - # + typeDesc - The `typedesc` of the record to which the result needs to be returned + # + rowType - The `typedesc` of the record to which the result needs to be returned # + return - Stream of records in the `rowType` type public isolated function get(typedesc rowType = <>) returns stream = @java:Method { 'class: "io.ballerina.stdlib.sql.nativeimpl.OutParameterProcessor", From 18308b016984f095322dda10588d0c570123a874 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Sun, 25 Feb 2024 17:46:11 +0000 Subject: [PATCH 21/30] [Automated] Update native jar versions in toml files --- ballerina/Dependencies.toml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 439d32bd..71bc9bc5 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -23,7 +23,7 @@ dependencies = [ [[package]] org = "ballerina" name = "cache" -version = "3.7.1" +version = "3.7.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "constraint"}, @@ -35,7 +35,7 @@ dependencies = [ [[package]] org = "ballerina" name = "constraint" -version = "1.5.0" +version = "1.4.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.6" +version = "2.10.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -111,7 +111,6 @@ modules = [ org = "ballerina" name = "jballerina.java" version = "0.0.0" -scope = "testOnly" modules = [ {org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"} ] @@ -282,7 +281,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.2.2" +version = "1.2.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -345,7 +344,6 @@ modules = [ org = "ballerina" name = "time" version = "2.4.0" -scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] From 89e67c0a14d96038dbe941044795f44041e216a9 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Sun, 25 Feb 2024 17:56:30 +0000 Subject: [PATCH 22/30] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 4 ++-- ballerina/CompilerPlugin.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 53a5d4e2..8252ac66 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -16,10 +16,10 @@ graalvmCompatible = true groupId = "io.ballerina.stdlib" artifactId = "sql-native" version = "1.12.0" -path = "../native/build/libs/sql-native-1.12.0-SNAPSHOT.jar" +path = "../native/build/libs/sql-native-1.12.0.jar" [[platform.java17.dependency]] -path = "../test-utils/build/libs/sql-test-utils-1.12.0-SNAPSHOT.jar" +path = "../test-utils/build/libs/sql-test-utils-1.12.0.jar" scope = "testOnly" [[platform.java17.dependency]] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 7e9ed6e0..d8d47b3b 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "sql-compiler-plugin" class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.12.0-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.12.0.jar" From 0601abe445441a1ee3901d422bd9d03ebdf1182c Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Sun, 25 Feb 2024 17:56:44 +0000 Subject: [PATCH 23/30] [Gradle Release Plugin] - pre tag commit: 'v1.12.0'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c43443a7..480ede90 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.ballerina.stdlib -version=1.12.0-SNAPSHOT +version=1.12.0 puppycrawlCheckstyleVersion=10.12.1 hikkariLibVersion=3.3.1 From feabd28c865827eec69bcf384362df2e3f147914 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Sun, 25 Feb 2024 17:56:45 +0000 Subject: [PATCH 24/30] [Gradle Release Plugin] - new version commit: 'v1.12.1-SNAPSHOT'. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 480ede90..fe38baa6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.ballerina.stdlib -version=1.12.0 +version=1.12.1-SNAPSHOT puppycrawlCheckstyleVersion=10.12.1 hikkariLibVersion=3.3.1 From ab4ec6b7507ea8a635b0980fab545d93deec4c06 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Mon, 26 Feb 2024 13:45:16 +0530 Subject: [PATCH 25/30] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 8 ++++---- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 10 ++++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index 8252ac66..d34aaa39 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,7 +1,7 @@ [package] org = "ballerina" name = "sql" -version = "1.12.0" +version = "1.12.1" authors = ["Ballerina"] keywords = ["database", "client", "network", "SQL", "RDBMS"] repository = "https://github.com/ballerina-platform/module-ballerina-sql" @@ -15,11 +15,11 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" -version = "1.12.0" -path = "../native/build/libs/sql-native-1.12.0.jar" +version = "1.12.1" +path = "../native/build/libs/sql-native-1.12.1-SNAPSHOT.jar" [[platform.java17.dependency]] -path = "../test-utils/build/libs/sql-test-utils-1.12.0.jar" +path = "../test-utils/build/libs/sql-test-utils-1.12.1-SNAPSHOT.jar" scope = "testOnly" [[platform.java17.dependency]] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index d8d47b3b..9d58248c 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "sql-compiler-plugin" class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.12.0.jar" +path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.12.1-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 71bc9bc5..7ec0521b 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -23,7 +23,7 @@ dependencies = [ [[package]] org = "ballerina" name = "cache" -version = "3.7.0" +version = "3.7.1" scope = "testOnly" dependencies = [ {org = "ballerina", name = "constraint"}, @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.0" +version = "2.10.6" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -111,6 +111,7 @@ modules = [ org = "ballerina" name = "jballerina.java" version = "0.0.0" +scope = "testOnly" modules = [ {org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"} ] @@ -281,7 +282,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.2.0" +version = "1.2.2" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -300,7 +301,7 @@ dependencies = [ [[package]] org = "ballerina" name = "sql" -version = "1.12.0" +version = "1.12.1" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, @@ -344,6 +345,7 @@ modules = [ org = "ballerina" name = "time" version = "2.4.0" +scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] From 44e931a9e11a6fcbe1239f3012fcaf76c8bb5f81 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Tue, 26 Mar 2024 19:17:09 +0530 Subject: [PATCH 26/30] [Automated] Update native jar versions in toml files --- ballerina/Dependencies.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 7ec0521b..e1d8dc9d 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.6" +version = "2.10.12" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, From 2e9759a98303e1723bd03e5fa761e0612fbe311a Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 10 Apr 2024 10:29:39 +0530 Subject: [PATCH 27/30] [Automated] Update native jar versions in toml files --- ballerina/Ballerina.toml | 10 +++++----- ballerina/CompilerPlugin.toml | 2 +- ballerina/Dependencies.toml | 25 ++++++++++++------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index d34aaa39..0277f3c4 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,13 +1,13 @@ [package] org = "ballerina" name = "sql" -version = "1.12.1" +version = "1.13.0" authors = ["Ballerina"] keywords = ["database", "client", "network", "SQL", "RDBMS"] repository = "https://github.com/ballerina-platform/module-ballerina-sql" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.8.0" +distribution = "2201.9.0" [platform.java17] graalvmCompatible = true @@ -15,11 +15,11 @@ graalvmCompatible = true [[platform.java17.dependency]] groupId = "io.ballerina.stdlib" artifactId = "sql-native" -version = "1.12.1" -path = "../native/build/libs/sql-native-1.12.1-SNAPSHOT.jar" +version = "1.13.0" +path = "../native/build/libs/sql-native-1.13.0-SNAPSHOT.jar" [[platform.java17.dependency]] -path = "../test-utils/build/libs/sql-test-utils-1.12.1-SNAPSHOT.jar" +path = "../test-utils/build/libs/sql-test-utils-1.13.0-SNAPSHOT.jar" scope = "testOnly" [[platform.java17.dependency]] diff --git a/ballerina/CompilerPlugin.toml b/ballerina/CompilerPlugin.toml index 9d58248c..8a12f262 100644 --- a/ballerina/CompilerPlugin.toml +++ b/ballerina/CompilerPlugin.toml @@ -3,4 +3,4 @@ id = "sql-compiler-plugin" class = "io.ballerina.stdlib.sql.compiler.SQLCompilerPlugin" [[dependency]] -path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.12.1-SNAPSHOT.jar" +path = "../compiler-plugin/build/libs/sql-compiler-plugin-1.13.0-SNAPSHOT.jar" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index e1d8dc9d..c839efcf 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.8.0" +distribution-version = "2201.9.0-20240405-165800-4b163f78" [[package]] org = "ballerina" name = "auth" -version = "2.10.0" +version = "2.11.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "crypto"}, @@ -23,7 +23,7 @@ dependencies = [ [[package]] org = "ballerina" name = "cache" -version = "3.7.1" +version = "3.8.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "constraint"}, @@ -35,7 +35,7 @@ dependencies = [ [[package]] org = "ballerina" name = "constraint" -version = "1.4.0" +version = "1.5.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -44,7 +44,7 @@ dependencies = [ [[package]] org = "ballerina" name = "crypto" -version = "2.5.0" +version = "2.7.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, @@ -69,7 +69,7 @@ modules = [ [[package]] org = "ballerina" name = "http" -version = "2.10.12" +version = "2.11.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "auth"}, @@ -111,7 +111,6 @@ modules = [ org = "ballerina" name = "jballerina.java" version = "0.0.0" -scope = "testOnly" modules = [ {org = "ballerina", packageName = "jballerina.java", moduleName = "jballerina.java"} ] @@ -119,7 +118,7 @@ modules = [ [[package]] org = "ballerina" name = "jwt" -version = "2.10.0" +version = "2.11.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "cache"}, @@ -268,7 +267,7 @@ dependencies = [ [[package]] org = "ballerina" name = "oauth2" -version = "2.10.0" +version = "2.11.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "cache"}, @@ -282,7 +281,7 @@ dependencies = [ [[package]] org = "ballerina" name = "observe" -version = "1.2.2" +version = "1.2.3" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} @@ -301,7 +300,7 @@ dependencies = [ [[package]] org = "ballerina" name = "sql" -version = "1.12.1" +version = "1.13.0" dependencies = [ {org = "ballerina", name = "file"}, {org = "ballerina", name = "io"}, @@ -335,6 +334,7 @@ version = "0.0.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, {org = "ballerina", name = "lang.error"} ] modules = [ @@ -345,7 +345,6 @@ modules = [ org = "ballerina" name = "time" version = "2.4.0" -scope = "testOnly" dependencies = [ {org = "ballerina", name = "jballerina.java"} ] @@ -365,7 +364,7 @@ dependencies = [ [[package]] org = "ballerina" name = "uuid" -version = "1.7.0" +version = "1.8.0" scope = "testOnly" dependencies = [ {org = "ballerina", name = "crypto"}, From 9b25f9fe50b9f725dbf6f0f438af398387b43139 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 10 Apr 2024 10:30:14 +0530 Subject: [PATCH 28/30] Update lang and dependencies for update 09 --- build-config/resources/Ballerina.toml | 2 +- gradle.properties | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index d994552f..cc4d787f 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -7,7 +7,7 @@ keywords = ["database", "client", "network", "SQL", "RDBMS"] repository = "https://github.com/ballerina-platform/module-ballerina-sql" icon = "icon.png" license = ["Apache-2.0"] -distribution = "2201.8.0" +distribution = "2201.9.0" [platform.java17] graalvmCompatible = true diff --git a/gradle.properties b/gradle.properties index fe38baa6..d53cf5f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.ballerina.stdlib -version=1.12.1-SNAPSHOT +version=1.13.0-SNAPSHOT puppycrawlCheckstyleVersion=10.12.1 hikkariLibVersion=3.3.1 @@ -14,7 +14,7 @@ researchgateReleaseVersion=2.8.0 testngVersion=7.6.1 ballerinaGradlePluginVersion=2.0.1 -ballerinaLangVersion=2201.8.0 +ballerinaLangVersion=2201.9.0-20240405-165800-4b163f78 # Direct Dependencies # Level 01 @@ -29,30 +29,30 @@ stdlibOsVersion=1.8.0 stdlibFileVersion=1.9.0 # Ballerinax Observer -observeVersion=1.2.0 -observeInternalVersion=1.2.0 +observeVersion=1.2.3-20240408-194900-a0e331f +observeInternalVersion=1.2.2-20240408-195500-1436319 # Transitive Dependencies # Level 01 -stdlibConstraintVersion=1.4.0 +stdlibConstraintVersion=1.5.0 stdlibUrlVersion=2.4.0 # Level 02 -stdlibCryptoVersion=2.5.0 +stdlibCryptoVersion=2.7.0-20240328-114200-c8cc19f stdlibTaskVersion=2.5.0 # Level 03 -stdlibCacheVersion=3.7.0 +stdlibCacheVersion=3.8.0-20240409-101100-e2d7f4e stdlibMimeVersion=2.9.0 -stdlibUuidVersion=1.7.0 +stdlibUuidVersion=1.8.0-20240409-104400-2aaa58d # Level 04 -stdlibAuthVersion=2.10.0 -stdlibJwtVersion=2.10.0 -stdlibOAuth2Version=2.10.0 +stdlibAuthVersion=2.11.0-20240409-124200-655c2d4 +stdlibJwtVersion=2.11.0-20240409-134000-9b5bf2e +stdlibOAuth2Version=2.11.0-20240409-124200-15a9919 # Level 05 -stdlibHttpVersion=2.10.0 +stdlibHttpVersion=2.11.0-20240409-155700-86d3a0d # Level 06 -stdlibTransactionVersion=1.8.0 +stdlibTransactionVersion=1.9.0-20240410-102100-6c6c493 From d50fc85a5b3de399e23ef8b12f38f82c8b3a4290 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Wed, 10 Apr 2024 10:52:52 +0530 Subject: [PATCH 29/30] Update gradle.properties --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index d53cf5f7..eeff5fd6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -55,4 +55,4 @@ stdlibOAuth2Version=2.11.0-20240409-124200-15a9919 stdlibHttpVersion=2.11.0-20240409-155700-86d3a0d # Level 06 -stdlibTransactionVersion=1.9.0-20240410-102100-6c6c493 +stdlibTransactionVersion=1.9.0-20240410-104900-57aec29 From 565e0f4e4a8d362f40157139344fb70ce0b7d532 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Wed, 10 Apr 2024 20:47:29 +0530 Subject: [PATCH 30/30] [Automated] Update dependencies --- gradle.properties | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gradle.properties b/gradle.properties index eeff5fd6..20b50d3c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ researchgateReleaseVersion=2.8.0 testngVersion=7.6.1 ballerinaGradlePluginVersion=2.0.1 -ballerinaLangVersion=2201.9.0-20240405-165800-4b163f78 +ballerinaLangVersion=2201.9.0-20240410-095500-2653a74d # Direct Dependencies # Level 01 @@ -38,21 +38,21 @@ stdlibConstraintVersion=1.5.0 stdlibUrlVersion=2.4.0 # Level 02 -stdlibCryptoVersion=2.7.0-20240328-114200-c8cc19f +stdlibCryptoVersion=2.7.0-20240410-140300-72e9adb stdlibTaskVersion=2.5.0 # Level 03 stdlibCacheVersion=3.8.0-20240409-101100-e2d7f4e stdlibMimeVersion=2.9.0 -stdlibUuidVersion=1.8.0-20240409-104400-2aaa58d +stdlibUuidVersion=1.8.0-20240410-145100-af1ecf4 # Level 04 -stdlibAuthVersion=2.11.0-20240409-124200-655c2d4 -stdlibJwtVersion=2.11.0-20240409-134000-9b5bf2e -stdlibOAuth2Version=2.11.0-20240409-124200-15a9919 +stdlibAuthVersion=2.11.0-20240410-152000-921da1b +stdlibJwtVersion=2.11.0-20240410-151900-e59bad3 +stdlibOAuth2Version=2.11.0-20240410-152000-5b650e4 # Level 05 -stdlibHttpVersion=2.11.0-20240409-155700-86d3a0d +stdlibHttpVersion=2.11.0-20240410-161700-e275cb8 # Level 06 -stdlibTransactionVersion=1.9.0-20240410-104900-57aec29 +stdlibTransactionVersion=1.9.0-20240410-194000-a082909