Skip to content

Infer() use cases #1264

Closed Answered by stephenafamo
lyuboxa asked this question in Q&A
Mar 31, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Infer is a way for SQLBoiler to translate Go's "zero type" to what your DB could be expecting.

If a column is "NOT NULL" with no default, Infer will pass the zero value of the column if not set. The reason is that your database is expecting a value to be set.

This is how infer is expected to work. If you prefer more control you can use "Whitelist" or "Blacklist".

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lyuboxa
Comment options

@stephenafamo
Comment options

@lyuboxa
Comment options

Answer selected by lyuboxa
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