-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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? |
@muhlemmer the Go tree is open for Go1.17, and it would be awesome to have you as a contributor. If you are unavailable, no biggie I’ll send one or someone from my team will send one. Thank you for the experience report @kyleconroy, and for the discussions @kardianos, @ianlancetaylor, and @rsc. |
Hey @kyleconroy and @muhlemmer, do you have plans to submit CLs for these new types? I need them for ent and prefer to have them in the next release. Let me know if you don't have time and I can take it from here. Thanks |
@alexander-melentyev sent this CL https://go-review.googlesource.com/c/go/+/305929 (thank you Alexander!) but it adds for NullUint64 which wasn’t approved, as this proposal is for NullByte and NullInt64. While it makes sense to me to also add it, we are adhering to the proposal process. |
Change https://golang.org/cl/311572 mentions this issue: |
Change https://golang.org/cl/311989 mentions this issue: |
golang.org/cl/311572 is waiting for a trust +1. Is a package owner available to review? |
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: