Skip to main content

Crate franken_snowflake_sqlapi

Crate franken_snowflake_sqlapi 

Source
Expand description

franken-snowflake-sqlapi — the Snowflake SQL API protocol heart.

This crate owns the protocol data: the request/response schemas, the jsonv2 wire codec, and the HTTP-status response classification. It is pure and serde-driven — no asupersync, no live network. The cancel-correct statement lifecycle (bracket over submit/poll/partition/cancel) and the HTTPS transport land in the sibling beads fsnow-statement-lifecycle-ofl and fsnow-asupersync-native-https-ofq; this crate gives them the typed payloads and the status state machine to act on.

Modules:

§Protocol references

Behavioral source: Snowflake’s official SQL API docs (clean-room — docs + live observation + our own fixtures only). Consulted 2026-06-24: developer-guide/sql-api/{index,reference,submitting-requests,handling-responses}. See docs/protocol/schema_draft.md for the field-by-field rationale and docs/proof_lanes.md (Lane 1) for the proof obligations these types satisfy.

Modules§

driver
The async statement driver: pump the pure StatementMachine against the live franken-snowflake-http transport, cancel-correctly.
endpoints
The SQL API base paths, relative to the account host (<account>.snowflakecomputing.com). The transport crate joins these with the host and the query string (requestId, retry, async, partition, nullable).
lifecycle
The statement lifecycle state machine: submit -> poll/await -> partition assembly, as a pure, synchronous Mealy machine.
request
The POST /api/v2/statements request body and its query parameters.
response
The SQL API response bodies, one type per HTTP status class.
status
The SQL API response-status state machine.
wire
The jsonv2 wire codec: decode a result data cell per its column type.

Constants§

VERSION
Crate version string.