TIL there is a proposal in Go to allow database/sql queries to extract values into a struct, similar to how encoding/json or encoding/xml do value unmarshaling. Promising.
proposal: database/sql: add methods to scan an entire row into one value · Issue #61637 · golang/go
Edited: struct field names are matched to columns case-sensitively. Edited: untouched storage is ignored rather than zeroed. I propose adding the method ScanRow(dest any) error to the Row and Rows ...