database/sql: add NullInt16 support #40082
Comments
CC @kardianos |
@kyleconroy This looks reasonable. Can you send a CL? On a side note, these nullable wrappers would probably be a great use for generics... |
Yeah, can do. A bit swamped right now, but should have it done by the end of the week |
I know! Here's a four-line replacement for the various
Here's what it looks like in practice: https://go2goplay.golang.org/p/Qj8MqYWWAc3 |
Do we need NullByte for tinyint too? |
NullByte and NullInt16 both sound good. Might as well complete the family. |
Based on the discussion above, this seems like a likely accept. |
No change in consensus, so accepted. |
I have some spare time and like to contribute more to the Go project. May I volunteer for a CL @kyleconroy, or do you prefer to do it yourself? |
Hey Go team!
I maintain a database code generator. I'm having trouble correctly supporting null
smallint
columns because the database/sql package does not have aNullInt16
type. It would look almost identical toNullint32
andNullInt64
.The text was updated successfully, but these errors were encountered: