diff src/main/java/nl/cwi/monetdb/jdbc/MonetDriver.java.in @ 175:8700d9ef2ace

Added possibility via a connection property to let the JDBC driver return columnType value Types.VARCHAR instead of Types.CLOB in case the result column of a ResultSet or parameter in a PreparedStatement is of data type 'clob'. With this connection property set, you can reduce the overhead when working with clob column data from generic JDBC programs.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 28 Sep 2017 16:17:51 +0200 (2017-09-28)
parents d6abd1ffffbb
children fdf4c888d5b7
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
@@ -253,6 +253,11 @@ final public class MonetDriver implement
 		prop.description = "Whether BLOBs on the server should be treated as BINARY types, thus mapped to byte[]";
 		props.add(prop);
 
+		prop = new DriverPropertyInfo("treat_clob_as_varchar", "false");
+		prop.required = false;
+		prop.description = "Whether CLOBs on the server should be treated and handled as VARCHAR types in the JDBC driver"; // recommend for increased performance due to less overhead
+		props.add(prop);
+
 		prop = new DriverPropertyInfo("so_timeout", "0");
 		prop.required = false;
 		prop.description = "Defines the maximum time to wait in milliseconds on a blocking read socket call"; // this corresponds to the Connection.setNetworkTimeout() method introduced in JDBC 4.1