Mercurial > hg > monetdb-java
diff src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @ 380:bf521f343172
Added support for new Java 8 java.sql.Types: Types.TIME_WITH_TIMEZONE and Types.TIMESTAMP_WITH_TIMEZONE.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Wed, 07 Oct 2020 18:29:02 +0200 (2020-10-07) |
parents | d7661075ebf7 |
children | 3c224b31bd29 |
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java +++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @@ -638,7 +638,9 @@ public class MonetDatabaseMetaData case Types.BLOB: case Types.DATE: case Types.TIME: + case Types.TIME_WITH_TIMEZONE: case Types.TIMESTAMP: + case Types.TIMESTAMP_WITH_TIMEZONE: return true; } // conversion to all other types is not supported @@ -651,22 +653,26 @@ public class MonetDatabaseMetaData case Types.CLOB: case Types.DATE: case Types.TIMESTAMP: + case Types.TIMESTAMP_WITH_TIMEZONE: return true; } // conversion to all other types is not supported return false; case Types.TIME: + case Types.TIME_WITH_TIMEZONE: switch (toType) { case Types.CHAR: case Types.VARCHAR: /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ case Types.CLOB: case Types.TIME: + case Types.TIME_WITH_TIMEZONE: return true; } // conversion to all other types is not supported return false; case Types.TIMESTAMP: + case Types.TIMESTAMP_WITH_TIMEZONE: switch (toType) { case Types.CHAR: case Types.VARCHAR: @@ -674,7 +680,9 @@ public class MonetDatabaseMetaData case Types.CLOB: case Types.DATE: case Types.TIME: + case Types.TIME_WITH_TIMEZONE: case Types.TIMESTAMP: + case Types.TIMESTAMP_WITH_TIMEZONE: return true; } // conversion to all other types is not supported