# HG changeset patch
# User Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
# Date 1575462956 -3600
# Node ID 11e1ccef1cf65cc47ddfd5898aba6f34a39a8473
# Parent  bcb9a99d399db3b5fcf98fa5b55af35c627c96a5
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).

diff --git a/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in b/src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in
--- 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));