changeset 177:4959b85b981c

Extend DatabaseMetaData.getClientInfoProperties() with new property: treat_clob_as_varchar Also added missing logfile property and improved description for properties: treat_blob_as_binary and hash.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 05 Oct 2017 14:56:24 +0200 (2017-10-05)
parents e701b51b3552
children dd12348c41cf
files ChangeLog release.txt src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
diffstat 3 files changed, 16 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,7 +13,7 @@
   This custom clob mapping informs generic JDBC programs to fetch clob
   column values via method ResultSet.getString() instead of getClob()
   and Clob.getCharacterStream() and next fetching from the stream.
-  As MonetDB server MAPI communication protocol do not support
+  As MonetDB server MAPI communication protocol does not support
   streaming of parts of a CLOB value, the current implementation is to
   send over the whole CLOB value as a string. Therefore there is no
   performance gain when fetching those Clob values via getClob() and
--- a/release.txt
+++ b/release.txt
@@ -2,8 +2,8 @@ RELEASE NOTES
 MonetDB JDBC driver version 2.26 (Liberica/MCL-1.15)
 Release date: 2017-07-28
 
-This JDBC driver is designed for use with MonetDB, a main-memory
-database.  For more information see https://www.monetdb.org/.
+This JDBC driver is designed for use with MonetDB, a main-memory column-store RDBMS.
+For more information see https://www.monetdb.org/
 
 The MonetDB JDBC connection URL format is:
   jdbc:monetdb://<hostname>[:<portnr>]/<databasename>[?<property>=<value>[;<property>=<value>]]
@@ -11,15 +11,15 @@ The MonetDB JDBC connection URL format i
 The databasename must be provided and be equal to the name of the database served by the
 mserver5 process listening on the specified host and port number (default port is 50000).
 
-Supported properties are:
+Supported connection properties are:
 	user=<login name>
 	password=<secret value>
 	so_timeout=<time in milliseconds>
-	hash=<SHA1 or MD5>
-	language=<mal or sql>
-	treat_blob_as_binary=true
-	treat_clob_as_varchar=true
-	debug=true
+	hash=<SHA512, SHA384, SHA256, SHA1 and MD5>
+	language=<sql or mal>		default is: sql
+	treat_blob_as_binary=true	default is: false
+	treat_clob_as_varchar=true	default is: false
+	debug=true			default is: false
 	logfile=<name of logfile>
 
 For example:
@@ -27,6 +27,9 @@ For example:
 
 See also: https://www.monetdb.org/Documentation/Manuals/SQLreference/Programming/JDBC
 
+In a java program you can use: DatabaseMetaData.getClientInfoProperties();
+to retrieve the connection properties information from the driver.
+
 
 The MonetDB JDBC driver complies to JDBC 4.1 definition, see
  http://docs.oracle.com/javase/7/docs/technotes/guides/jdbc/index.html
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
@@ -3807,8 +3807,10 @@ public class MonetDatabaseMetaData exten
 		"SELECT 'language', 16, 'sql', 'language (sql or mal) used to parse commands in MonetDB server' UNION ALL " +
 		"SELECT 'database', 1024, 'demo', 'name of database. It matches the dbfarm subdirectory name' UNION ALL " +
 		"SELECT 'debug', 5, 'false', 'boolean flag true or false' UNION ALL " +
-		"SELECT 'hash', 128, '', 'hash string' UNION ALL " +
-		"SELECT 'treat_blob_as_binary', 5, 'false', 'boolean flag true or false' UNION ALL " +
+		"SELECT 'logfile', 1024, 'monet_######.log', 'name of logfile used when debug is enabled' UNION ALL " +
+		"SELECT 'hash', 128, '', 'hash methods list to use in server connection. Supported are SHA512, SHA384, SHA256, SHA1 and MD5' UNION ALL " +
+		"SELECT 'treat_blob_as_binary', 5, 'false', 'should blob columns be mapped to Types.VARBINARY instead of default Types.BLOB in ResultSets and PreparedStatements' UNION ALL " +
+		"SELECT 'treat_clob_as_varchar', 5, 'false', 'should clob columns be mapped to Types.VARCHAR instead of default Types.CLOB in ResultSets and PreparedStatements' UNION ALL " +
 		"SELECT 'so_timeout', 10, '0', 'timeout (in milliseconds) of communication socket. 0 means no timeout is set' " +
 		"ORDER BY \"NAME\"";