TimonKK / clickhouse

NodeJS client for ClickHouse
Apache License 2.0
221 stars 87 forks source link

How to create two clients each connected to dedicated schema. #119

Closed Badbreaddead closed 2 years ago

Badbreaddead commented 2 years ago

Thank you for this project! I wonder what is the best way to duplicate all my requests to several schemas. I created two instances of ClickHouse class with different database options passed to config, but just now realised that it sends two requests to each schema instead of one

Badbreaddead commented 2 years ago

actually I took a look at the source and have a proposal: maybe we can add database to opts of QueryCursor constructor? This way you can set up default database from each query. I can do PR if core maintainers approve

Badbreaddead commented 2 years ago

Sorry, my bad, it is misconfig on my side. Closing