From 427f603492eb9bdd9a246dfc4c64b241932ef3f4 Mon Sep 17 00:00:00 2001 From: Danesh Kuruppu Date: Sun, 26 May 2024 00:00:34 +0530 Subject: [PATCH] Add a comment tagging the issue for future reference --- .../parameterprocessor/AbstractStatementParameterProcessor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractStatementParameterProcessor.java b/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractStatementParameterProcessor.java index 260aedea..e4332f22 100644 --- a/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractStatementParameterProcessor.java +++ b/native/src/main/java/io/ballerina/stdlib/sql/parameterprocessor/AbstractStatementParameterProcessor.java @@ -211,6 +211,8 @@ public int setSQLValueParam(Connection connection, PreparedStatement preparedSta boolean returnType) throws DataError, SQLException { try { if (object == null) { + // If the value is null, we need to set the correct SQL type for the null value + // https://github.com/ballerina-platform/ballerina-library/issues/6562 preparedStatement.setNull(index, Types.NULL); return Types.NULL; } else if (object instanceof BString) {