ClickHouse / clickhouse-js

Official JS client for ClickHouse DB
https://clickhouse.com
Apache License 2.0
205 stars 25 forks source link

Clickhouse client working with bun js #211

Closed DeniroBlack closed 9 months ago

DeniroBlack commented 9 months ago

Bun js is fasted speed js runtime runner

https://bun.sh/

But client not working. Difference with node in this file

client/dist/connection/node_http_connection.js:19

May be difference in http client

Please fix this in next versions. Or tell please how I may fix this myself

slvrtrn commented 9 months ago

I am not familiar with this tool. However, I see fetch usage there. Does it work with @clickhouse/client-web?

DeniroBlack commented 9 months ago

I am not familiar with this tool. However, I see fetch usage there. Does it work with @clickhouse/client-web?

With web version works fine! Thanks!

dsumer commented 8 months ago

Would love to see this issue being reopened. It's working with the @clickhouse/client-web library, but that means we lose the ability to work with the connection pool and keepAlive feature which is only available in the @clickhouse/client library.

Would be awesome if the @clickhouse/client library would also be compatible with Bun, thank you! :)

slvrtrn commented 8 months ago

@dsumer, I suspect the Node.js version will not work with Bun unless we rewrite it entirely to the fetch API. I think the right approach is to make keep-alive configurable in the web version instead - it will be there after https://github.com/ClickHouse/clickhouse-js/pull/220.

slvrtrn commented 7 months ago

@dsumer, as 0.2.8 is out, it is now possible to modify Keep-Alive setting for the web version (and it is enabled by default). See the release notes.