0.2.0 - Web platform support
Introduces web client (using native fetch and WebStream APIs) without Node.js modules in the common interfaces.
No polyfills are required.
The web client is confirmed to work with Chrome/Firefox/CloudFlare workers.
It is now possible to implement new custom connections on top of @clickhouse/client-common
.
The repository was refactored into three packages:
@clickhouse/client-common
: all possible platform-independent code, types and interfaces@clickhouse/client-web
: new web (or non-Node.js env) connection, uses native fetch.@clickhouse/client
: Node.js connection as it was before.
Node.js client breaking changes
- Changed
ping
method behavior: it will not throw now.
Instead, either{ success: true }
or{ success: false, error: Error }
is returned. - Log level configuration parameter is now explicit instead of
CLICKHOUSE_LOG_LEVEL
environment variable.
Default isOFF
. query
return type signature changed to isBaseResultSet<Stream.Readable>
(no functional changes)exec
return type signature changed toExecResult<Stream.Readable>
(no functional changes)insert<T>
params argument type changed toInsertParams<Stream, T>
(no functional changes)- Experimental
schema
module is removed
Web client known limitations
- Streaming for select queries works, but it is disabled for inserts (on the type level as well).
- KeepAlive is disabled and not configurable yet.
- Request compression is disabled and configuration is ignored. Response compression works.
- No logging support yet.