Before the following did not work, it always uses user `dev`, even with
`clickhouse-client --connection prod`:
```yaml
user: dev
connections_credentials:
prod:
name: prod
user: prod
```
The problem was that before it was not possible to distinguish options
that had been set via command line options and via configuration file.
I've splitted this two actions, and embedded a call to
parseConnectionsCredentials() in between.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This is somehow analog of .netrc [1].
[1]: https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html
The follow options can be overwritten on a per-hostname/connection
basis:
- hostname
- port
- secure
- user
- password
- database
- history_file
Also note, that you can have multiple settings for one hostname, can be
useful to distinguish readonly from non-readonly for example.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>