comparison src/main/java/org/monetdb/jdbc/MonetDatabaseMetaData.java @ 757:7f68120de37c

Corrected DatabaseMetaData method getClientProperties(). It used to return connection properties instead of client info properties. Extended tests. HG En commit message. Lines beginning with 'HG:' are removed.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 22 Jun 2023 14:54:03 +0200 (22 months ago)
parents 99ff3cd9f4f0
children 846a456f0f0c
comparison
equal deleted inserted replaced
756:a39d3a45da56 757:7f68120de37c
3909 * @return A ResultSet object; each row is a supported client info property 3909 * @return A ResultSet object; each row is a supported client info property
3910 * @throws SQLException if a database access error occurs 3910 * @throws SQLException if a database access error occurs
3911 */ 3911 */
3912 @Override 3912 @Override
3913 public ResultSet getClientInfoProperties() throws SQLException { 3913 public ResultSet getClientInfoProperties() throws SQLException {
3914 // for a list of connection properties see also MonetConnection.java constructor MonetConnection(Properties props) 3914 // MonetDB currently does not support any client properties, so return an empty ResultSet
3915 final String query = 3915 final String query =
3916 "SELECT * FROM (VALUES " + 3916 "SELECT cast(null as varchar(64)) AS \"NAME\", " +
3917 "('autocommit', cast(5 as int), 'true', 'boolean flag true or false to turn autocommit on or off')," + 3917 "cast(0 as int) AS \"MAX_LEN\", " +
3918 "('database', 1024, 'demo', 'name of database. It matches the dbfarm subdirectory name')," + 3918 "cast(null as varchar(128)) AS \"DEFAULT_VALUE\", " +
3919 "('debug', 5, 'false', 'boolean flag true or false to turn debug logging on or off')," + 3919 "cast(null as varchar(128)) AS \"DESCRIPTION\" " +
3920 "('fetchsize', 11, '250', 'number of result rows to fetch per round trip')," + // only supported by servers from version 11.41.1 onwards 3920 "WHERE 1=0";
3921 "('hash', 128, '', 'hash methods list to use in server connection. Supported are SHA512, SHA384, SHA256 and SHA1')," +
3922 "('host', 1024, 'localhost', 'DSN or IP-address of machine running MonetDB')," +
3923 "('language', 16, 'sql', 'language (sql or mal) used to parse commands in MonetDB server')," +
3924 "('logfile', 1024, 'monet_######.log', 'name of logfile used when debug is enabled')," +
3925 "('password', 128, '', 'password for user name to login to MonetDB server')," +
3926 "('port', 5, '50000', 'communication port number of MonetDB server process')," +
3927 "('so_timeout', 10, '0', 'timeout (in milliseconds) of communication socket. 0 means no timeout is set')," +
3928 "('treat_blob_as_binary', 5, 'true', 'should blob columns be mapped to Types.VARBINARY instead of Types.BLOB in ResultSets and PreparedStatements')," +
3929 "('treat_clob_as_varchar', 5, 'true', 'should clob columns be mapped to Types.VARCHAR instead of Types.CLOB in ResultSets and PreparedStatements')," +
3930 "('user', 1024, '', 'user name to login to MonetDB server')" +
3931 ") AS t(\"NAME\", \"MAX_LEN\", \"DEFAULT_VALUE\", \"DESCRIPTION\")" +
3932 " ORDER BY \"NAME\"";
3933 3921
3934 return executeMetaDataQuery(query); 3922 return executeMetaDataQuery(query);
3935 } 3923 }
3936 3924
3937 /** 3925 /**