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
-
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:
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:
![image](https://private-user-images.githubusercontent.com/120684947/269773167-ada97869-75b9-4f29-bdd2-a4eef4d4ee20.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEyNjAwNDksIm5iZiI6MTcyMTI1OTc0OSwicGF0aCI6Ii8xMjA2ODQ5NDcvMjY5NzczMTY3LWFkYTk3ODY5LTc1YjktNGYyOS1iZGQyLWE0ZWVmNGQ0ZWUyMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxN1QyMzQyMjlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYzY1ZWZkMDMxYzRhN2U1OTQwZDk3YTBlOGUyNGM2M2U1Zjg2ZmNkNTQ0NDUwZTEyZGM2ODMwMzdiZjJhMWUxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.-KCq14bQKvIFx8F64M55CTR8Sq5UnBAaaTKA295EdJ4)
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