Skip to content

mySQL w/ SQL Boiler v4.6.0 & Null V8 #968

Answered by aarondl
TekknoGuy asked this question in Q&A
Discussion options

You must be logged in to vote

@TekknoGuy this is sort of a well understood pattern in Go because the sql standard library has these same types of types in them: https://pkg.go.dev/database/sql#NullBool - the null package we use simply makes them a bit more ergonomic

model.Name = null.FromString("Whatever") // this creates a non-null null.String

Whether or not that excuses a lack of documentation I'm not sure :D

It's because your table column allows null that the null types are used. If you do NOT NULL you will just see a string.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stephenafamo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants