You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: allow lenient mode for connection properties (#671)
* feat: allow lenient mode for connection properties
Some applications automatically add additional properties to connection strings
that are unknown to the Spanner Connection API (and thereby also the Spanner
JDBC driver). This causes the connection attempt to fail. This change allows a
user to specify 'lenient' mode where unknown properties only generate a warning
instead of an error.
Fixesdropwizard/dropwizard#3461Fixesgoogleapis/google-cloud-java#6671Fixesgoogleapis/java-spanner-jdbc#283
* fix: add credentials to prevent tests from trying to use env credentials
@@ -212,7 +216,11 @@ public String[] getValidValues() {
212
216
"The custom user-agent property name to use when communicating with Cloud Spanner. This property is intended for internal library usage, and should not be set by applications."),
213
217
ConnectionProperty.createStringProperty(
214
218
OPTIMIZER_VERSION_PROPERTY_NAME,
215
-
"Sets the default query optimizer version to use for this connection."))));
219
+
"Sets the default query optimizer version to use for this connection."),
220
+
ConnectionProperty.createBooleanProperty(
221
+
LENIENT_PROPERTY_NAME,
222
+
"Silently ignore unknown properties in the connection string/properties (true/false)",
0 commit comments