TimonKK / clickhouse

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

Allow sending session ID with each query #52

Closed sarthaksahni closed 4 years ago

sarthaksahni commented 4 years ago

As discussed over Issue #50, it would be great to allow users to send session id with each query.

Use Case So If I have 10 users who query massively at my DB, I need to create a temp table for each of them, now my node express API will query the DB upon each request and it is quite possible that parallel requests do hit, so if there is a single session the session lock might fail the request, hence if I create multiple session one for each of my users, then in that case the lock will be acquired by one user and for that user only!