Closed PmegaOcalc closed 6 months ago
I will add URL support for http[s]://[username]:[password]@[host]:[port]/[database]
in the next version and deprecate host
(that was not the best name for it).
@PmegaOcalc, regarding [?query_parameters]
/[?paramspec]
.
In the CLI client, it works like:
clickhouse-client clickhouse://localhost/my_database?s
# equivalent to:
clickhouse-client clickhouse://localhost/my_database -s
Would you expect CHJS to be (almost) entirely configurable via the URL, similar to the CLI?
yes, please
@PmegaOcalc, will be included in 1.0.0, ETA ~few weeks.
Use case
We set database environment variables based on the standard format of xxx://[userspec@][hostspec][/dbname][?paramspec] Clickhouse js client currently doesn't support it and we need to specify the env variables inconsistently to other databases.
Describe the solution you'd like
Add support for connection string like clickhouse://[user_info@][hosts_and_ports][/dbname][?query_parameters] as it is already supported in clickhouse https://github.com/ClickHouse/ClickHouse/pull/50689
Additional context
ClickHouseClientConfigOptions defines the connection options