Changelog — @clickhouse/rowbinary
This file tracks the standalone
@clickhouse/rowbinarypackage (the RowBinary parser library and agent skill). Entries relevant to it (through@clickhouse/client1.23.0) were previously recorded in the now-frozen repository-wideCHANGELOG.md.
0.2.0
New features
Added the RowBinary writer — the encode mirror of the reader: type-specific
writeX(sink, value)building blocks and combinators that compose with no per-element closures, exported from@clickhouse/rowbinary/writer(or the per-type modules). (#911)writeRows(writeRow)drives anIterable<T>of rows into a plainRowBinarypayload. Note its shape: it is a streaming generator, not a one-shotWriter<readonly T[]>. It writes into a fixed-size buffer (bufferSize, default 64 KiB), yields each batch of whole rows when the buffer fills — rewinding so a half-written row never leaks — and starts a fresh buffer for the rest, so a result larger than the buffer (or an unbounded row source) streams out chunk by chunk. An oversized row grows the buffer (doubling) rather than failing, and per-buffer fill is published on the@clickhouse/rowbinary:writeRows.flushnode:diagnostics_channelfor buffer-utilization metrics. (#915)import { writeRows, writeTupleNamed, writeUInt64, writeString, } from "@clickhouse/rowbinary/writer"; const writeRow = writeTupleNamed({ id: writeUInt64, name: writeString }); for (const chunk of writeRows(writeRow)(rows, 64 * 1024)) send(chunk);Writer edge-case hardening:
writeDate/writeDate32/writeDateTimefloor to the calendar day / whole second instead of rounding (so a non-midnightDateor sub-secondDateTimeno longer rounds up);parseIPv6rejects malformed hex groups instead of silently encoding0; andwriteGeometryvalidates the discriminant before writing its byte, so an out-of-range value can't leave a partial payload. (#916)
0.1.2
Improvements
0.1.1
New features
- Initial release of
@clickhouse/rowbinary: a RowBinary reader library (and the companion agent skill) shipping 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 same library is also bundled into@clickhouse/client(registered inagents.skills). Requires Node.js>=20. A matching RowBinary writer is planned. (#864)