Changeset: d9a45743536d for monetdb-java URL: https://dev.monetdb.org/hg/monetdb-java/rev/d9a45743536d Modified Files: src/main/java/org/monetdb/client/JdbcClient.java src/main/java/org/monetdb/jdbc/MonetConnection.java src/main/java/org/monetdb/jdbc/MonetDriver.java src/main/java/org/monetdb/mcl/MCLException.java src/main/java/org/monetdb/mcl/io/BufferedMCLReader.java src/main/java/org/monetdb/mcl/net/MapiSocket.java src/main/java/org/monetdb/util/CmdLineOpts.java tests/JDBC_API_Tester.java tests/build.xml Branch: monetdbs Log Message:
Merge 'default' into 'monetdbs' diffs (truncated from 1916 to 300 lines): diff --git a/.github/workflows/monetdbversions.yml b/.github/workflows/monetdbversions.yml --- a/.github/workflows/monetdbversions.yml +++ b/.github/workflows/monetdbversions.yml @@ -16,6 +16,7 @@ jobs: - "monetdb/dev-builds:Jan2022" - "monetdb/dev-builds:Sep2022" - "monetdb/dev-builds:Jun2023" + - "monetdb/dev-builds:Dec2023" - "monetdb/dev-builds:default" services: diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,27 @@ # ChangeLog file for monetdb-java # This file is updated with Maddlog +* Thu Dec 28 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> +- In ResultSet.getObject(column, Class<T> type) and + ResultSet.getObject(column, Map<String,Class<?>>) methods added support + to return objects for classes: java.time.LocalDate, java.time.LocalDateTime + and java.time.LocalTime. + +* Wed Dec 20 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> +- Enhanced DatabaseMetaData.getTables() method by adding support for SQL + table type names: 'BASE TABLE', 'GLOBAL TEMPORARY' and 'LOCAL TEMPORARY' + in parameter types[]. These are SQL synonyms of MonetDB table type names: + 'TABLE', 'GLOBAL TEMPORARY TABLE' and 'LOCAL TEMPORARY TABLE'. + +* Thu Dec 14 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> +- In ResultSet.getObject() method added support for retrieving + TIMESTAMP WITH TIME ZONE data as java.time.OffsetDateTime object + and TIME WITH TIME ZONE as java.time.OffsetTime object. + Also methods ResultSetMetaData.getColumnClassName() and + ParameterMetaData.getParameterClassName() now return + java.time.OffsetDateTime.class for columns of type TIMESTAMP WITH TIME ZONE + and java.time.OffsetTime.class for columns of type TIME WITH TIME ZONE. + * Thu Oct 12 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> - Improved DatabaseMetaData.getSystemFunctions(). It now also returns functions: current_sessionid, greatest, ifnull, least, sql_max, sql_min. @@ -34,9 +55,9 @@ * Wed Jul 5 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> - Corrected implementation of Connection methods getClientInfo() and - setClientInfo(). They used to get/set Connection properties instead - of Client Info properties which was a incorrect. MonetDB does not - support Client Info properties. + setClientInfo(). They used to get/set Connection properties instead of + Client Info properties, which was incorrect. MonetDB does not support + Client Info properties. * Thu Jun 22 2023 Martin van Dinther <martin.van.dint...@monetdbsolutions.com> - Corrected DatabaseMetaData method getClientProperties(). diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -all: src/main/java/org/monetdb/jdbc/MonetVersion.java +all: src/main/java/org/monetdb/jdbc/MonetVersion.java.in ant -f build.xml distjdbc distmerocontrol cd tests; ant -f build.xml jar_jdbctests @@ -7,9 +7,6 @@ jre17jars: src/main/java/org/monetdb/jdb ant -f build_jre17.xml distjdbc rm -rf build -src/main/java/org/monetdb/jdbc/MonetVersion.java: build.properties src/main/java/org/monetdb/jdbc/MonetVersion.java.in - . ./build.properties; sed -e "s/@JDBC_MAJOR@/$$JDBC_MAJOR/g;s/@JDBC_MINOR@/$$JDBC_MINOR/g;s/@JDBC_VER_SUFFIX@/$$JDBC_VER_SUFFIX $$buildno/g" src/main/java/org/monetdb/jdbc/MonetVersion.java.in > src/main/java/org/monetdb/jdbc/MonetVersion.java - testsjar: cd tests; ant -f build.xml jar_jdbctests diff --git a/SQLSTATEs b/SQLSTATEs --- a/SQLSTATEs +++ b/SQLSTATEs @@ -27,6 +27,11 @@ 22M29 invalid inet format 22M30 invalid URL format 22M31 invalid UUID format 22M32 invalid JSON format +22M33 invalid Date format +22M34 invalid Time format +22M35 invalid Timestamp format +22M36 invalid Time with time zone format +22M37 invalid Timestamp with time zone format 2BM37 dependent objects still exist 2DM30 autocommit mode active diff --git a/build.xml b/build.xml --- a/build.xml +++ b/build.xml @@ -1,11 +1,15 @@ <?xml version="1.0"?><!-- vim:set ts=2 sw=2 expandtab: --> <!-- +SPDX-License-Identifier: MPL-2.0 + This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. +Copyright 2024 MonetDB Foundation; +Copyright August 2008 - 2023 MonetDB B.V.; +Copyright 1997 - July 2008 CWI. --> <!-- @@ -49,8 +53,6 @@ Copyright 1997 - July 2008 CWI, August 2 value="${jardir}/jdbcclient.${jre.version}.jar" /> <property name="jmonetdb-jar" value="${jardir}/jmonetdb.${jre.version}.jar" /> - <property name="mcl-jar" - value="${jardir}/monetdb-mcl-${MCL_MAJOR}.${MCL_MINOR}.${jre.version}.jar" /> <property name="mero-control-jar" value="${jardir}/merocontrol.${jre.version}.jar" /> @@ -253,8 +255,6 @@ Copyright 1997 - July 2008 CWI, August 2 <!-- Some defaults --> <filter token="JDBC_MAJOR" value="${JDBC_MAJOR}" /> <filter token="JDBC_MINOR" value="${JDBC_MINOR}" /> - <filter token="MCL_MAJOR" value="${MCL_MAJOR}" /> - <filter token="MCL_MINOR" value="${MCL_MINOR}" /> <filter token="JDBC_VER_SUFFIX" value="${JDBC_VER_SUFFIX} ${TODAY}" /> <fail unless="JDBC_MAJOR" message="'JDBC_MAJOR' undefined. Please follow the directions in build.properties."/> diff --git a/build_jre17.xml b/build_jre17.xml --- a/build_jre17.xml +++ b/build_jre17.xml @@ -1,11 +1,15 @@ <?xml version="1.0"?><!-- vim:set ts=2 sw=2 expandtab: --> <!-- +SPDX-License-Identifier: MPL-2.0 + This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. +Copyright 2024 MonetDB Foundation; +Copyright August 2008 - 2023 MonetDB B.V.; +Copyright 1997 - July 2008 CWI. --> <!-- @@ -41,7 +45,7 @@ Copyright 1997 - July 2008 CWI, August 2 <property name="jvm.version" value="17" /> <property name="jre.version" value="jre17" /> - <property name="javac.flags" value="-source 17" /> + <property name="javac.flags" value="-source 8" /> <property name="javac.flags" value="-target 17" /> <property name="javac.flags" value="-profile compact2" /> <property name="javac.flags" value="-Xlint" /> @@ -52,8 +56,6 @@ Copyright 1997 - July 2008 CWI, August 2 value="${jardir}/jdbcclient.${jre.version}.jar" /> <property name="jmonetdb-jar" value="${jardir}/jmonetdb.${jre.version}.jar" /> - <property name="mcl-jar" - value="${jardir}/monetdb-mcl-${MCL_MAJOR}.${MCL_MINOR}.${jre.version}.jar" /> <property name="mero-control-jar" value="${jardir}/merocontrol.${jre.version}.jar" /> @@ -256,8 +258,6 @@ Copyright 1997 - July 2008 CWI, August 2 <!-- Some defaults --> <filter token="JDBC_MAJOR" value="${JDBC_MAJOR}" /> <filter token="JDBC_MINOR" value="${JDBC_MINOR}" /> - <filter token="MCL_MAJOR" value="${MCL_MAJOR}" /> - <filter token="MCL_MINOR" value="${MCL_MINOR}" /> <filter token="JDBC_VER_SUFFIX" value="${JDBC_VER_SUFFIX} ${TODAY}" /> <fail unless="JDBC_MAJOR" message="'JDBC_MAJOR' undefined. Please follow the directions in build.properties."/> diff --git a/example/MJDBCTest.java b/example/MJDBCTest.java --- a/example/MJDBCTest.java +++ b/example/MJDBCTest.java @@ -1,9 +1,13 @@ /* + * SPDX-License-Identifier: MPL-2.0 + * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. + * Copyright 2024 MonetDB Foundation; + * Copyright August 2008 - 2023 MonetDB B.V.; + * Copyright 1997 - July 2008 CWI. */ import java.sql.*; diff --git a/example/OnClientExample.java b/example/OnClientExample.java --- a/example/OnClientExample.java +++ b/example/OnClientExample.java @@ -1,9 +1,13 @@ /* + * SPDX-License-Identifier: MPL-2.0 + * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. + * Copyright 2024 MonetDB Foundation; + * Copyright August 2008 - 2023 MonetDB B.V.; + * Copyright 1997 - July 2008 CWI. */ import org.monetdb.jdbc.MonetConnection; diff --git a/example/PreparedExample.java b/example/PreparedExample.java --- a/example/PreparedExample.java +++ b/example/PreparedExample.java @@ -1,9 +1,13 @@ /* + * SPDX-License-Identifier: MPL-2.0 + * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. + * Copyright 2024 MonetDB Foundation; + * Copyright August 2008 - 2023 MonetDB B.V.; + * Copyright 1997 - July 2008 CWI. */ import java.sql.*; diff --git a/example/SQLImport.java b/example/SQLImport.java --- a/example/SQLImport.java +++ b/example/SQLImport.java @@ -1,9 +1,13 @@ /* + * SPDX-License-Identifier: MPL-2.0 + * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. + * Copyright 2024 MonetDB Foundation; + * Copyright August 2008 - 2023 MonetDB B.V.; + * Copyright 1997 - July 2008 CWI. */ import java.sql.*; diff --git a/src/main/java/org/monetdb/client/JMonetDB.java b/src/main/java/org/monetdb/client/JMonetDB.java --- a/src/main/java/org/monetdb/client/JMonetDB.java +++ b/src/main/java/org/monetdb/client/JMonetDB.java @@ -1,9 +1,13 @@ /* + * SPDX-License-Identifier: MPL-2.0 + * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. + * Copyright 2024 MonetDB Foundation; + * Copyright August 2008 - 2023 MonetDB B.V.; + * Copyright 1997 - July 2008 CWI. */ package org.monetdb.client; diff --git a/src/main/java/org/monetdb/client/JdbcClient.java b/src/main/java/org/monetdb/client/JdbcClient.java --- a/src/main/java/org/monetdb/client/JdbcClient.java +++ b/src/main/java/org/monetdb/client/JdbcClient.java @@ -1,9 +1,13 @@ /* + * SPDX-License-Identifier: MPL-2.0 + * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V. + * Copyright 2024 MonetDB Foundation; + * Copyright August 2008 - 2023 MonetDB B.V.; + * Copyright 1997 - July 2008 CWI. */ package org.monetdb.client; @@ -754,7 +758,9 @@ public final class JdbcClient { } else if (command.equals("\\vsgi_noheader")) { // used only for internal automated testing MDBvalidator.validateSqlGeomTablesIntegrity(con, false); } else if (command.startsWith("\\vsi ")) { - String schema_nm = command.substring(5); + String schema_nm = command.substring(5).trim(); + if (schema_nm.endsWith(";")) + schema_nm = schema_nm.substring(0, schema_nm.length() - 1); MDBvalidator.validateSchemaIntegrity(con, schema_nm, true); } else if (command.startsWith("\\vsi_noheader ")) { // used only for internal automated testing String schema_nm = command.substring(14); diff --git a/src/main/java/org/monetdb/jdbc/MonetBlob.java b/src/main/java/org/monetdb/jdbc/MonetBlob.java --- a/src/main/java/org/monetdb/jdbc/MonetBlob.java +++ b/src/main/java/org/monetdb/jdbc/MonetBlob.java @@ -1,9 +1,13 @@ /* + * SPDX-License-Identifier: MPL-2.0 + * _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org