Replies: 1 comment
-
I don't think there's a clean way to do this at the moment. If you can send in a PR for this, I will be happy to review it. Note that if it is a breaking change, it either has to be kept behind a flag for generation, or I would not be able to merge it until we are ready for |
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
-
When writing an integration test for an older Update operation - inserting test data, using Update and then comparing the result to what is expected, this is quite difficult when using Infer, as it will set the column datetime to the current time, unless SkipTimestamps is set to on, and set the updated time manually. I don't really want to set that to on if I can avoid it, as it just seems like extra complication - particular as it then means blacklisting other timestamp columns so they don't get overwritten.
In other services we would pass in a clock interface (ie github.com/benbjohnson/clock) as a way to set the current time at test startup, and then can match that the time is the same as expected. Is there a similar mechanism in sqlboiler?
Obviously we could avoid comparing the timestamped fields in the returned struct but that smells pretty funky to me.
Beta Was this translation helpful? Give feedback.
All reactions