diff src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in @ 349:11e1ccef1cf6

Add mapping for type 'str' which is returned when you execute a PREPARE ... statement for the metadata info for descriptions columns: schema, table and column. Those columns where mapped to JDBC type Types.OTHER and hence not displayed by the actual value in SQuirreL. Now they are mapped to Types.VARCHAR and properly displayed (like in mclient).
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Wed, 04 Dec 2019 13:35:56 +0100 (2019-12-04)
parents 55330e40cbf1
children 54137aeb1f92
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in
@@ -349,6 +349,7 @@ final public class MonetDriver implement
 		typeMap.put("real", Integer.valueOf(Types.REAL));
 		typeMap.put("sec_interval", Integer.valueOf(Types.DECIMAL));
 		typeMap.put("smallint", Integer.valueOf(Types.SMALLINT));
+		typeMap.put("str", Integer.valueOf(Types.VARCHAR));	// MonetDB prepare <stmt> uses type 'str' (instead of varchar) for the schema, table and column metadata output
 		// typeMap.put("table", Integer.valueOf(Types.???));
 		typeMap.put("time", Integer.valueOf(Types.TIME));
 		typeMap.put("timestamp", Integer.valueOf(Types.TIMESTAMP));