Replies: 2 comments
-
Okay, I see that I can set the field type to an interface and then check case for each one. That seems like a poor pattern, would there be a different way to handle this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
The problem is not specific to The solution is to use a type that can represent a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to get a row scanned into my struct, and I got most of the way through, but one of my rows is missing some data, and I'm wondering how to handle that since when using
I get the error
2024/03/28 02:14:33 can't scan into dest[5]: cannot scan NULL into *time.Time
and the documentation doesn't seem the mention anything (unless I am just reading right over it
Also does PGX support casting into strings on scan. I had to import time to handle
created_by
which is fine but postgres has some deeper types that might get weird to cast into no? That is on the same note as handling null but not entirely so not sure if it warrants it's own discussionBeta Was this translation helpful? Give feedback.
All reactions