Skip to main content

Module writer

Module writer 

Source
Expand description

Msgpack scalar writers for constructing response messages, aggregate results, projections, and other output data — all in raw msgpack without intermediary types.

These are the building blocks for zero-serialization response construction. Follow the timeseries ingest pattern: SqlValue → row_to_msgpack() at ingress, raw msgpack throughout, msgpack_to_json_string() at outermost pgwire/HTTP layer.

Functions§

build_str_map
Build a simple msgpack map from string key-value pairs.
inject_str_field
Inject a string field into a msgpack map without full decode.
merge_fields
Merge field updates into a msgpack map without full decode.
write_array_header
Write a msgpack array header.
write_bin
Write a msgpack binary blob (bin 8/16/32).
write_bool
Write a msgpack boolean.
write_f64
Write a msgpack float64.
write_i64
Write a msgpack integer using the most compact encoding.
write_kv_bool
Write a key-value pair (string key, bool value).
write_kv_f64
Write a key-value pair (string key, f64 value).
write_kv_i64
Write a key-value pair (string key, i64 value).
write_kv_null
Write a key-value pair (string key, null value).
write_kv_raw
Write a key-value pair (string key, raw msgpack value bytes).
write_kv_str
Write a key-value pair into a msgpack map being built.
write_map_header
Write a msgpack map header.
write_null
Write a msgpack null.
write_str
Write a msgpack string (header + UTF-8 bytes).