(rows Rows)
| 546 | type mapRowScanner map[string]any |
| 547 | |
| 548 | func (rs *mapRowScanner) ScanRow(rows Rows) error { |
| 549 | values, err := rows.Values() |
| 550 | if err != nil { |
| 551 | return err |
| 552 | } |
| 553 | |
| 554 | *rs = make(mapRowScanner, len(values)) |
| 555 | |
| 556 | for i := range values { |
| 557 | (*rs)[rows.FieldDescriptions()[i].Name] = values[i] |
| 558 | } |
| 559 | |
| 560 | return nil |
| 561 | } |
| 562 | |
| 563 | // RowToStructByPos returns a T scanned from row. T must be a struct. T must have the same number of public fields as row |
| 564 | // has fields. The row and T fields will be matched by position. If the "db" struct tag is "-" then the field will be |
nothing calls this directly
no test coverage detected