@kinedb/protocol (0.0.0-g791e73859dc9)
Installation
@kinedb:registry=https://git.kinedb.com/api/packages/kinedb/npm/npm install @kinedb/protocol@0.0.0-g791e73859dc9"@kinedb/protocol": "0.0.0-g791e73859dc9"About this package
@kinedb/protocol
The wire types of kinedb. The package mirrors the Rust crate kinedb-protocol.
It has no dependency.
import { COLUMN_CODES, COLUMN_CODE_NAMES } from '@kinedb/protocol';
COLUMN_CODES.Text; // 4
COLUMN_CODE_NAMES[4]; // 'Text'
Today the package holds the frozen column-code table only. The type of a column lives once in the reply header, and its code decides the byte layout of every cell in that column. Code 0 is a column with only NULL cells.
| role | Rust crate | npm |
|---|---|---|
| wire types + TLV/frame codec | kinedb-protocol |
@kinedb/protocol |
| direct client (remote server) | (none yet) | @kinedb/client |
| embedded engine + sync | kinedb |
@kinedb/embedded |
@kinedb/client and @kinedb/embedded still hold their own copy of the table.
A test in each package compares the copies. Step 2 of B1159 makes both packages
import this package.
The Rust side assigns the same codes twice: column_code in
crates/kinedb-protocol/src/typed_rows.rs (the server) and type_key in
crates/kinedb-wasm/src/lib.rs (the wasm engine). The test
src/rust-column-codes.test.js reads both Rust files and compares their codes
with this table (B3548).
The forge registry hosts the package:
https://git.kinedb.com/api/packages/kinedb/npm/.