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:
request—POST /api/v2/statementsbody:request::SubmitStatementRequest, positional typedrequest::Bindings, and sessionrequest::SubmitQueryParams.response— the response bodies, one per HTTP status: a 200response::ResultSet, a 202response::QueryStatus, a 408/422response::QueryFailureStatus, and theresponse::StatementCancelResponse, plusresponse::ResultSetMetaData/response::ColumnType/response::PartitionInfo.status—status::ResponseClass: the 200/202/408/422/429 routing state machine, kept distinct so no two states are ever conflated.wire— thewire::CellValuejsonv2codec: everydatacell is a JSON string decoded per itsresponse::ColumnType, never by JSON shape.
§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
StatementMachineagainst the livefranken-snowflake-httptransport, 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/statementsrequest 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
jsonv2wire codec: decode a resultdatacell per its column type.
Constants§
- VERSION
- Crate version string.