comparison src/main/java/org/monetdb/jdbc/MonetDriver.java @ 939:fd938d0a2b3a

Include all Parameters in GetPropertyInfo Not just user, password, tls and cert.
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Wed, 08 Jan 2025 15:41:48 +0100 (3 months ago)
parents d416e9b6b3d0
children
comparison
equal deleted inserted replaced
938:64ea9d5fbf87 939:fd938d0a2b3a
153 @Override 153 @Override
154 public DriverPropertyInfo[] getPropertyInfo(final String url, final Properties info) { 154 public DriverPropertyInfo[] getPropertyInfo(final String url, final Properties info) {
155 if (!acceptsURL(url)) 155 if (!acceptsURL(url))
156 return null; 156 return null;
157 157
158 // delegate to mcl.net.Parameters enum class, which maintains all connection properties 158 // Delegate to enum mcl.net.Parameters, which maintains all connection properties.
159 return Parameter.getPropertyInfo(info, url.startsWith("jdbc:monetdbs:")); 159 // Note that if the URL starts with jdbc:monetdb://, TLS is always off.
160 // If it starts with jdbc:monetdbs://, TLS is always on.
161 // Only when the URL is exactly "jdbc:monetdb:", without slashes, TLS is determined
162 // by the properties.
163 boolean includeTls = (url.equals("jdbc:monetdb:") || url.startsWith("jdbc:monetdbs:"));
164 return Parameter.getPropertyInfo(info, includeTls);
160 } 165 }
161 166
162 /** 167 /**
163 * Reports whether this driver is a genuine JDBC Compliant&trade; driver. A 168 * Reports whether this driver is a genuine JDBC Compliant&trade; driver. A
164 * driver may only report true here if it passes the JDBC compliance tests; 169 * driver may only report true here if it passes the JDBC compliance tests;