client-1.23.0
Migration Notes
-
Node.js 26.x was added to the CI matrix, and Node.js 18.x is no longer supported. The
engines.nodefloor of@clickhouse/client(previously>=16) and@clickhouse/datatype-parser(previously>=18.0.0) was raised to>=20. Node.js 20.x, 22.x, 24.x, and 26.x are supported and exercised in CI. -
The
@clickhouse/client-commonpackage is deprecated.@clickhouse/client(Node.js) and@clickhouse/client-web(Web) no longer depend on it; the shared code is now bundled into each client package. Everything previously importable from@clickhouse/client-commonshould be imported from@clickhouse/clientor@clickhouse/client-webinstead. The@clickhouse/client-commonpackage itself will no longer receive updates. (#845) -
The
parseColumnTypefunction and itsSimpleColumnTypescompanion (exported from@clickhouse/client,@clickhouse/client-web, and@clickhouse/client-common) are deprecated and slated for removal in a future major version. They are superseded by the new standalone@clickhouse/datatype-parserpackage (parseDataTypeplus itsNodeAST), which parses the full ClickHouse data-type grammar and emits an AST that mirrors the server's. (#893)
New features
-
(Node.js) Added a RowBinary reader library and agent skill under
skills/clickhouse-js-node-rowbinary-parser. It ships type-specific, monomorphizable building blocks for decodingRowBinary/RowBinaryWithNames/RowBinaryWithNamesAndTypesstreams (full-buffer and chunked), plus a skill that guides an agent to generate bespoke high-performance parsers from a query's column types. The skill is bundled into@clickhouse/client(registered inagents.skills) and is also published independently as the@clickhouse/rowbinarypackage. A matching RowBinary writer is planned. (#864) -
Published the
@clickhouse/datatype-parserpackage: a small, dependency-free standalone parser for ClickHouse data-type strings (the kind sent in the types row ofRowBinaryWithNamesAndTypes, e.g.Array(Nullable(UInt64)),Tuple(a UInt8, b String),Enum8('a' = 1)). It is a faithful port of the server'sParserDataTypeand emits a JSON AST that is byte-identical to the server'sEXPLAIN AST json = 1data-type subtree. It supersedes the deprecatedparseColumnType(see Migration Notes). (#893) -
(Node.js,
@experimental) Added an additiveconnection?: Connection<Stream.Readable>option tocreateClientthat lets a caller plug an externally-built backendConnection-like object in place of the default HTTP(S) factory. Only supposed to be used for testing thechDBintegration. (#879) -
Added
ClickHouseSettingsInterface, a package-neutral structural counterpart toClickHouseSettings, exported from@clickhouse/client,@clickhouse/client-web, and@clickhouse/client-common. It is identical toClickHouseSettingsexcept that its index signature omitsSettingsMap(a class with a private member, which TypeScript compares nominally). Because each client package now bundles its own copy of the common module, theirClickHouseSettingstypes are mutually unassignable;ClickHouseSettingsInterfaceis structurally identical across all three packages and assignable into each package'sClickHouseSettings, so a consumer that shares a single settings-producing helper across both the Node.js and Web clients can type it against this one type without casts. Values typed asSettingsMapcannot be carried through it — useClickHouseSettingsif you need them. (#889)