Closed xrip closed 1 year ago
Thanks for your contribution, @xrip, but I agree with @mshustov here.
This example:
const url = new URL('clickhouse://clickhouse://john:secret@127.0.0.1:9000')
const client = createClient({ host: url.host, .... });
is very simple and trivial to implement when needed in the application, so I don't see the necessity to build it into the client itself.
I also understand that having a PR declined does not feel good. To avoid situations like this in the future, I think we should start with a feature request issue, where an intention to contribute could be stated. This way, we can discuss the pros and cons in advance and decide if it's worth investing the time into writing the actual code/tests and reviewing it later.
I'd also like to add that we have a backlog of triaged issues if you are willing to contribute, for example:
After clickhouse-client added connection string support (https://github.com/ClickHouse/ClickHouse/pull/50689) there is now nothing stops to add same support to this client.
Summary
This pull request add support for URL connection string in ClickHouse client.
Extended the ClickHouse client configuration to accept a URL connection string which can contain user info, hosts and ports, database name and query parameters. This change provides flexible and standard connections setup. Updated related unit tests to reflect this change.
Checklist
Delete items not relevant to your PR: