Releases: ClickHouse/clickhouse-js
Releases · ClickHouse/clickhouse-js
Release list
1.16.0
New features
- Added support for the new Disposable API (a.k.a the
usingkeyword) (#500)
async function main() {
await using client = await client.query(…);
// some code that can throw
// but thanks to `using` the client will still get closed
// client is also automatically closed here by calling [Symbol.disaposeAsync]
}Without the new using keyword it is required to wrap the code that might leak expensive resources like sockets and big buffers in try / finally
async function main() {
let client
try {
client = await createClient(…);
// some code that can throw
} finally {
if (client) {
await client.close()
}
}
}1.15.0
1.14.0
New features
- It is now possible to specify custom
parseandstringifyfunctions that will be used instead of the standardJSON.parseandJSON.stringifymethods for JSON serialization/deserialization when working withJSON*family formats. SeeClickHouseClientConfigOptions.json, and a new custom_json_handling example for more details. (#481, looskie) - (Node.js only) Added an
ignore_error_responseparam toClickHouseClient.exec, which allows callers to manually handle request errors on the application side. (#483, Kinzeng)
1.13.0
New features
- Server-side exceptions that occur in the middle of the HTTP stream are now handled correctly. This requires ClickHouse 25.11+. Previous ClickHouse versions are unaffected by this change. (#478)
Improvements
Bug fixes
- Fixed boolean value formatting in query parameters. Boolean values within
Array,Tuple, andMaptypes are now correctly formatted asTRUE/FALSEinstead of1/0to ensure proper type compatibility with ClickHouse. (#475, baseballyama)
1.12.1
1.12.0
Types
- Add missing
allow_experimental_join_conditiontoClickHouseSettingstyping. (#430, looskie) - Fixed
JSONEachRowWithProgressTypeScript flow after the breaking changes in ClickHouse 25.1.RowOrProgress<T>now has an additional variant:SpecialEventRow<T>. The library now additionally exports theparseErrormethod, and newly addedisRow/isExceptiontype guards. See the updated JSONEachRowWithProgress example (#443) - Added missing
allow_experimental_variant_type(24.1+),allow_experimental_dynamic_type(24.5+),allow_experimental_json_type(24.8+),enable_json_type(25.3+),enable_time_time64_type(25.6+) toClickHouseSettingstyping. (#445)
Improvements
- Add a warning on a socket closed without fully consuming the stream (e.g., when using
queryorexecmethod). (#441) - (Node.js only) An option to use a simple SELECT query for ping checks instead of
/pingendpoint. See the new optional argument to theClickHouseClient.pingmethod andPingParamstypings. Note that the Web version always used a SELECT query by default, as the/pingendpoint does not support CORS, and that cannot be changed. (#442)
Other
1.11.2 (Common, Node.js)
A minor release to allow further investigation regarding uncaught error issues with #410.
Types
- Added missing
lightweight_deletes_synctyping toClickHouseSettings(#422, pratimapatel2008)
Improvements (Node.js)
- Added a new configuration option:
capture_enhanced_stack_trace; see the JS doc in the Node.js client package. Note that it is disabled by default due to a possible performance impact. (#427) - Added more try-catch blocks to the Node.js connection layer. (#427)
1.11.1 (Common, Node.js, Web)
Bug fixes
- Fixed an issue with URLEncoded special characters in the URL configuration for username or password. (#407)
Improvements
- (Node.js only) Added support for streaming on 32-bit platforms. (#403, shevchenkonik)
1.11.0 (Common, Node.js, Web)
New features
- It is now possible to provide custom HTTP headers when calling the
query/insert/command/execmethods using thehttp_headersoption. NB:http_headersspecified this way will overridehttp_headersset on the client instance level. (#394, @DylanRJohnston) - (Web only) It is now possible to provide a custom
fetchimplementation to the client. (#315, @lucacasonato)