pgx icon indicating copy to clipboard operation
pgx copied to clipboard

Null handling for .RowsToStructByName

Open sai-sy opened this issue 1 year ago • 2 comments

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

sai-sy avatar Apr 04 '24 08:04 sai-sy

Would you please provide the code showing this issue?

pashagolub avatar May 15 '24 10:05 pashagolub