We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I'm wondering about how NewNullString handles strings of value "". If the example is as such:
title := "" // set from elsewhere sugg := &Suggestion{ Title: NewNullString(title), CreatedAt: time.Now(), }
It seems that the database column value of title is set to "" rather than NULL.
title
The text was updated successfully, but these errors were encountered:
Figured it out by testing for length of string and then inserting NewNullString. This seems to be the idiomatic way.
Sorry, something went wrong.
No branches or pull requests
Hello,
I'm wondering about how NewNullString handles strings of value "". If the example is as such:
It seems that the database column value of
title
is set to "" rather than NULL.The text was updated successfully, but these errors were encountered: