RowToStructByPos returns a T scanned from row. T must be a struct. T must have the same number of public fields as row has fields. The row and T fields will be matched by position. If the "db" struct tag is "-" then the field will be ignored.
(row CollectableRow)
| 564 | // has fields. The row and T fields will be matched by position. If the "db" struct tag is "-" then the field will be |
| 565 | // ignored. |
| 566 | func RowToStructByPos[T any](row CollectableRow) (T, error) { |
| 567 | var value T |
| 568 | err := (&positionalStructRowScanner{ptrToStruct: &value}).ScanRow(row) |
| 569 | return value, err |
| 570 | } |
| 571 | |
| 572 | // RowToAddrOfStructByPos returns the address of a T scanned from row. T must be a struct. T must have the same number a |
| 573 | // public fields as row has fields. The row and T fields will be matched by position. If the "db" struct tag is "-" then |