Expand description
Type-aware conversion from Snowflake SQL REST API rows to JSON objects.
The Snowflake SQL REST API returns every cell as a string, regardless of
its column type, and ships a schema (resultSetMetaData.rowType) alongside
the rows. This module pairs each cell with its column metadata and
produces a serde_json::Value::Object per row.
Type coverage (Snowflake’s type field is lowercase in the JSON v2 format):
| Snowflake type | JSON output |
|---|---|
fixed, scale 0 | Number (i64/u64 if it fits, else String — full precision) |
fixed, scale > 0 | String (exact decimal — full precision preserved) |
real | Number (f64) |
boolean | Bool |
text / binary | String |
date / time / timestamp_* | String (ISO/Unix-seconds as-is) |
variant / object / array | parsed JSON value (falls back to String) |
| anything else | String (raw cell) |
null cells map to Value::Null regardless of declared type.
Structs§
- Column
Meta - One entry in
resultSetMetaData.rowType. Only the fields we actually use are deserialised; everything else is ignored.
Functions§
- row_
to_ json - Build a JSON object out of one Snowflake row (an array of string cells).