News for hackers. Stuff that matters.
Re:Null Values in SQL Queries by kaslai on Tuesday February 04, 2020 @01:58AM (#22233107)
My typical pattern is to use pointer types as a pseudo-optional type. There is the additional cost of dealing with a pointer on the Go side though, which can get cumbersome at times.

`database/sql` does have an interface which lets you define your own marshaling code though. Using it is very simple and would let you marshal an all-zero UUID into NULL easily enough.

There are no comments on this comment yet.