diff --git a/pom.xml b/pom.xml index bd7bbf6..069c820 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.ascendix.salesforce salesforce-jdbc - 1.6.1${suffix.version}-release + 1.6.3${suffix.version}-release jar Salesforce JDBC Driver diff --git a/src/main/java/com/ascendix/jdbc/salesforce/metadata/ForceDatabaseMetaData.java b/src/main/java/com/ascendix/jdbc/salesforce/metadata/ForceDatabaseMetaData.java index a205c30..79d8dd1 100644 --- a/src/main/java/com/ascendix/jdbc/salesforce/metadata/ForceDatabaseMetaData.java +++ b/src/main/java/com/ascendix/jdbc/salesforce/metadata/ForceDatabaseMetaData.java @@ -388,7 +388,7 @@ public String getDriverName() { @Override public String getDriverVersion() { - return getDriverMajorVersion() + "." + getDriverMinorVersion() + ".1"; + return getDriverMajorVersion() + "." + getDriverMinorVersion() + ".3"; } @Override diff --git a/src/main/java/com/ascendix/jdbc/salesforce/statement/processor/utils/ValueToStringVisitor.java b/src/main/java/com/ascendix/jdbc/salesforce/statement/processor/utils/ValueToStringVisitor.java index 524ca1d..76d9cb0 100644 --- a/src/main/java/com/ascendix/jdbc/salesforce/statement/processor/utils/ValueToStringVisitor.java +++ b/src/main/java/com/ascendix/jdbc/salesforce/statement/processor/utils/ValueToStringVisitor.java @@ -92,13 +92,16 @@ public Expression visit(Select subSelect, S context) { public Expression visit(JdbcParameter parameter, S context) { int idx = parameter.getIndex() - 1; Object o = parameters.get(idx); - fieldValues.put(columnName, getParameter(o)); + fieldValues.put(columnName, o); return null; } private static Object getParameter(Object o) { if (o == null) { return "NULL"; + } else if (o instanceof java.sql.Date date) { + LocalDate localDate = Instant.ofEpochMilli(date.getTime()).atZone(ZoneId.systemDefault()).toLocalDate(); + return ParamUtils.SQL_DATE_FORMAT.format(localDate); } else if (o instanceof Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date);