Expand description
Result rows and arbitrary-schema → JSON decoding.
Snowflake’s v1 query endpoint returns column metadata (rowtype) plus a
row set whose cells are stringified (or null). This module models a column,
a row, and the mapping from a raw cell to a serde_json::Value driven by the
column’s Snowflake type tag — implemented from the documented wire formats
(e.g. DATE is days-since-epoch, timestamps are seconds[.fraction]).
Structs§
- Column
- Metadata for one result column, from the query response
rowtype. - Row
- One result row: raw stringified cells plus the shared column schema.
Functions§
- rows_
to_ payload - Builds the self-describing
{ columns: [{name, type}], rows: [{col: val}] }payload from a query’s rows. Column metadata comes from the first row (an empty result reportscolumns: []). - value_
to_ json - Maps a single raw cell to JSON according to its column type. Total: any
decode failure falls back to the raw string (or
null).