Replies: 1 comment
-
|
From what I see, you're passing a pointer and trying to read a rows := [6]any{
entityId.String(), "yxi", "in progress", subTime, verTime, scanTime,
} |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Writing tests for my implementation, it fails to rows.Scan() value into *time.Time. Put breakpoints on the test and debugger showing that rows.Scan returns an error
The specific line of code in my implementation with the scan:
This is the test code where I'm using pgxmock:
{ "level":"error", "error":"Scanning value error for column 'submission_datetime': cannot scan *time.Time", "time":"2023-09-21T14:15:14-07:00" }I'm not sure how to resolve this. The query + scan works when I use pgx.
This is the struct definition for a zeronull.Timestamptz:

We can see that it implements the Scan() function but the receiver is a pointer to a struct.
Beta Was this translation helpful? Give feedback.
All reactions