Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java21] Migrate to new runtime APIs #752

Merged
merged 13 commits into from
Nov 16, 2024
2 changes: 1 addition & 1 deletion build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.10.0-20241019-091600-89e54c08"
distribution = "2201.11.0"

[platform.java21]
graalvmCompatible = true
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ subprojects {
ballerinaStdLibs "io.ballerina.stdlib:http-ballerina:${stdlibHttpVersion}"
ballerinaStdLibs "io.ballerina.stdlib:observe-ballerina:${observeVersion}"
ballerinaStdLibs "io.ballerina:observe-ballerina:${observeInternalVersion}"
ballerinaStdLibs "io.ballerina.lib:data.jsondata-ballerina:${stdlibDataJsonDataVersion}"

externalJars (group: 'com.zaxxer', name: 'HikariCP', version: "${hikkariLibVersion}") {
transitive = false
Expand Down
44 changes: 23 additions & 21 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=io.ballerina.stdlib
version=1.14.2-SNAPSHOT
version=1.15.0-SNAPSHOT

puppycrawlCheckstyleVersion=10.12.1
hikkariLibVersion=3.3.1
Expand All @@ -14,45 +14,47 @@ researchgateReleaseVersion=2.8.0
testngVersion=7.6.1
ballerinaGradlePluginVersion=2.0.1

ballerinaLangVersion=2201.10.0-20241019-091600-89e54c08
ballerinaLangVersion=2201.11.0-20241112-214900-6b80ab87


# Direct Dependencies
# Level 01
stdlibIoVersion=1.6.2-20240928-084100-656404f
stdlibTimeVersion=2.5.1-20240930-120200-e59222b
stdlibIoVersion=1.6.2-20241112-233100-995cf5f
stdlibTimeVersion=2.6.0-20241113-073800-201b904

# Level 02
stdlibLogVersion=2.10.1-20240930-154200-5ab2aa4
stdlibOsVersion=1.8.1-20241001-120600-dd1626e
stdlibLogVersion=2.10.1-20241113-120000-4577868
stdlibOsVersion=1.8.1-20241113-122000-cca973b

# Level 03
stdlibFileVersion=1.10.1-20241007-160900-03f7b64
stdlibFileVersion=1.10.1-20241113-151700-e1a2e38

# Ballerinax Observer
observeVersion=1.3.1-20241007-161000-645452d
observeInternalVersion=1.3.1-20241015-172900-cdc3cb3
observeVersion=1.4.0-20241113-092000-b83ae74
observeInternalVersion=1.3.1-20241113-101700-265054d

# Transitive Dependencies
# Level 01
stdlibConstraintVersion=1.5.1-20240930-123400-5ecd396
stdlibUrlVersion=2.4.1-20240930-120200-b7fb9e1
stdlibConstraintVersion=1.6.0-20241113-090900-d276ad5
stdlibUrlVersion=2.4.1-20241113-073900-335ff51

# Level 02
stdlibCryptoVersion=2.7.3-20240930-132000-5ecc9ab
stdlibTaskVersion=2.5.1-20241002-145700-5bdb843
stdlibCryptoVersion=2.7.3-20241113-081400-d015a39
stdlibTaskVersion=2.5.1-20241113-123500-f905281

# Level 03
stdlibCacheVersion=3.8.1-20241007-154900-63f4403
stdlibMimeVersion=2.10.1-20241009-141200-8b6c9f0
stdlibUuidVersion=1.8.1-20241009-134600-a05012b
stdlibCacheVersion=3.8.1-20241113-125700-b75a1bf
stdlibMimeVersion=2.10.2-20241113-154200-d953747
stdlibUuidVersion=1.8.1-20241113-154400-443c67b

# Level 04
stdlibAuthVersion=2.12.1-20241010-130800-733dbef
stdlibJwtVersion=2.13.1-20241010-123600-5ea6a94
stdlibOAuth2Version=2.12.1-20241029-084800-d7ba9e5
stdlibAuthVersion=2.12.1-20241113-162300-ded40eb
stdlibDataJsonDataVersion=0.3.0-20241114-143900-285d739
stdlibJwtVersion=2.13.1-20241113-162400-b59ccfa
stdlibOAuth2Version=2.12.1-20241113-162400-4c6ddfe

# Level 05
stdlibHttpVersion=2.13.0-20241029-110700-30ed05b
stdlibHttpVersion=2.13.0-20241114-182900-7e9f66a

# Level 06
stdlibTransactionVersion=1.10.1-20241021-105400-f7e16a8
stdlibTransactionVersion=1.10.1-20241116-112500-189a4e5
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/
package io.ballerina.stdlib.sql.datasource;

import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BMap;
import io.ballerina.runtime.api.values.BString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
package io.ballerina.stdlib.sql.nativeimpl;

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.types.StructureType;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BArray;
Expand Down Expand Up @@ -60,11 +60,11 @@
import static io.ballerina.stdlib.sql.Constants.RESULT_SET_TOTAL_NATIVE_DATA_FIELD;
import static io.ballerina.stdlib.sql.Constants.STATEMENT_NATIVE_DATA_FIELD;
import static io.ballerina.stdlib.sql.Constants.TYPE_DESCRIPTIONS_NATIVE_DATA_FIELD;
import static io.ballerina.stdlib.sql.utils.Utils.closeResources;
import static io.ballerina.stdlib.sql.utils.Utils.getColumnDefinitions;
import static io.ballerina.stdlib.sql.utils.Utils.getDefaultStreamConstraint;
import static io.ballerina.stdlib.sql.utils.Utils.getSqlQuery;
import static io.ballerina.stdlib.sql.utils.Utils.updateProcedureCallExecutionResult;
import static io.ballerina.stdlib.sql.utils.Utils.closeResources;

/**
* This class holds the utility methods involved with executing the call statements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

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.types.TypeTags;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BObject;
import io.ballerina.runtime.api.values.BStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
package io.ballerina.stdlib.sql.nativeimpl;

import io.ballerina.runtime.api.Environment;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.types.RecordType;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.types.UnionType;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package io.ballerina.stdlib.sql.parameterprocessor;

import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BArray;
import io.ballerina.runtime.api.values.BDecimal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
*/
package io.ballerina.stdlib.sql.parameterprocessor;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.ArrayType;
import io.ballerina.runtime.api.types.Field;
import io.ballerina.runtime.api.types.PredefinedTypes;
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.types.TypeTags;
import io.ballerina.runtime.api.types.UnionType;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.utils.XmlUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

package io.ballerina.stdlib.sql.parameterprocessor;

import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.types.ArrayType;
import io.ballerina.runtime.api.types.Field;
import io.ballerina.runtime.api.types.ObjectType;
import io.ballerina.runtime.api.types.StructureType;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.types.TypeTags;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BArray;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

package io.ballerina.stdlib.sql.utils;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.types.StructureType;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
package io.ballerina.stdlib.sql.utils;

import io.ballerina.runtime.api.Module;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.TypeTags;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.creators.ValueCreator;
import io.ballerina.runtime.api.flags.SymbolFlags;
import io.ballerina.runtime.api.flags.TypeFlags;
import io.ballerina.runtime.api.types.ArrayType;
import io.ballerina.runtime.api.types.Field;
import io.ballerina.runtime.api.types.PredefinedTypes;
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.types.TypeTags;
import io.ballerina.runtime.api.types.UnionType;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BArray;
Expand Down
4 changes: 2 additions & 2 deletions native/src/test/java/io/ballerina/stdlib/sql/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
package io.ballerina.stdlib.sql;

import io.ballerina.runtime.api.Module;
import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.creators.TypeCreator;
import io.ballerina.runtime.api.types.Field;
import io.ballerina.runtime.api.types.IntersectionType;
import io.ballerina.runtime.api.types.ObjectType;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.types.RecordType;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.values.BArray;
Expand All @@ -36,10 +36,10 @@
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.internal.IteratorUtils;
import io.ballerina.runtime.internal.scheduling.Strand;
import io.ballerina.runtime.internal.types.BField;
import io.ballerina.runtime.internal.types.BRecordType;
import io.ballerina.runtime.internal.utils.IteratorUtils;
import io.ballerina.runtime.internal.values.BmpStringValue;
import io.ballerina.stdlib.sql.utils.PrimitiveTypeColumnDefinition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package io.ballerina.stdlib.sql.nativeimpl;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.values.BMap;
import io.ballerina.runtime.api.values.BObject;
import io.ballerina.runtime.api.values.BString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package io.ballerina.stdlib.sql.parameterprocessor;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BArray;
import io.ballerina.runtime.api.values.BMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
package io.ballerina.stdlib.sql.parameterprocessor;

import io.ballerina.runtime.api.PredefinedTypes;
import io.ballerina.runtime.api.types.PredefinedTypes;
import io.ballerina.runtime.api.values.BString;
import io.ballerina.stdlib.sql.TestUtils;
import io.ballerina.stdlib.sql.exception.ApplicationError;
Expand Down
Loading