Null handling for .RowsToStructByName
- Dominant language
- Go
- Stars
- 14.3k
- Forks
- 1.1k
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 11
Description
**Is your feature request related to a problem? Please describe.**
I try and unmarshall queries into structs, but of course many cells in the rows are null. This is solved by pointer-to-pointer reference when using the .Scan() method but .RowToStructByName doesn't seem to work the same way.
**Describe the solution you'd like**
If I could just reference the object I'm unmarshalling into with a pointer (which would semantically match the other use case) or use a different function to work with null values, this would be helpful
Contributor guide
Research direction
Start with the .RowsToStructByName entry point and compare its null handling with the .Scan() use case described in the issue. Determine how pointer-based struct targets or an alternative function should behave for null cells, then verify that the chosen behavior supports unmarshalling query rows into structs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, postgresql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100