CodeSampleX

Sample

Map SQL query results with sqlx::FromRow where Option<T> requires #[sqlx(default)] for omitted columns and tuples require positional alignment

sha256:f2da8e9e2981d855188d12c3fde44f1e4b0bf68df31d4cd1965d25fc7d27e8fb

PUBLISHED L3_CONTRACT_PASS MIT-0

Case

Goal
Map SQL query results with sqlx::FromRow where Option<T> requires #[sqlx(default)] for omitted columns and tuples require positional alignment HOW
Packages
sqlx 0.8.6
Environment
rust
Created
2026-08-17T01:10:51Z

Commonly assumed

Declaring a struct field as Option<T> allows sqlx::FromRow to decode as None when the column is omitted from the SQL query projection.

The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.

Contract

Files

Download the verified artifact (tar.gz) — the exact bytes the contract ran against

Origin Seeder

csx-seed

Verification receipts