-
Notifications
You must be signed in to change notification settings - Fork 588
[jdbc-v2] Adds default port and restricts multiple endpoints #2489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 To request another review, post a new comment with "/windsurf-review".
jdbc-v2/src/main/java/com/clickhouse/jdbc/internal/JdbcConfiguration.java
Show resolved
Hide resolved
jdbc-v2/src/test/java/com/clickhouse/jdbc/internal/JdbcConfigurationTest.java
Show resolved
Hide resolved
@@ -198,6 +210,9 @@ public Object[][] createInvalidConnectionURLs() { | |||
{ "jdbc:clickhouse://foo.bar?x&y=z" }, | |||
{ "jdbc:clickhouse://foo.bar?x==&y=z" }, | |||
{ "jdbc:clickhouse://localhost?☺=value1" }, | |||
// multiple endpoints are invalid | |||
{ "jdbc:clickhouse://foo,bar" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, multiple endpoints is what we do not plan to support:
- JDBC has datasources for multiple endpoints
- Client v2 has
addEndpoint()
that will be used to add more endpoints when we support them.
@enqueue thank you for the contribution! |
Summary
This PR ensures that valid JDBC URLs are also accepted as endpoints by Client.
JDBC URLs which contain multiple endpoints are considered invalid
This is an alternative PR to #2488 which supports the use of multiple endpoints in JDBC URLs.
Checklist