Skip to main content

Module response

Module response 

Source
Expand description

The SQL API response bodies, one type per HTTP status class.

Snowflake returns a different JSON shape per status code: a 200 carries a ResultSet, a 202 a QueryStatus (poll again), and a 408/422 a QueryFailureStatus. See crate::status::ResponseClass for the routing.

data cells stay Option<String> at the schema layer: every non-null cell is a jsonv2 JSON string decoded later by crate::wire per its ColumnType; a SQL NULL is JSON null → None.

Structs§

ColumnType
A single column’s authoritative type metadata — the source of truth for decoding (type + scale + precision), never row inspection.
PartitionInfo
The size of one result partition. numRows on the parent ResultSetMetaData is the total; these are per-partition.
QueryFailureStatus
A 408 (statement timeout) or 422 (statement failed) body. The HTTP status distinguishes the two — 408 is a typed timeout, 422 a SQL compile/execution failure — so the same shape carries both.
QueryStatus
A 202 Accepted still-running status — the poll-again signal. Re-GET the handle (or QueryStatus::statement_status_url) until it returns 200.
ResultSet
A 200 OK completed result. Partition 0 arrives inline in data; later partitions are fetched separately (see PartitionInfo).
ResultSetMetaData
Metadata describing the columns, total row count, and partition layout of a ResultSet.
StatementCancelResponse
The body returned by POST /api/v2/statements/{handle}/cancel.