Expected behavior of types.NullDecimal
#1211
Unanswered
achempak-polymer
asked this question in
Q&A
Replies: 1 comment
-
I ran into this issue when trying to convert a NullDecimal to a Decimal. I hot-fixed the issue by handling the panic caused by a nil pointer dereference when
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a nullable
Decimal
column in our db (for Postgres 14), and it looks like sqlboiler marshals this into atypes.NullDecimal
object. What is the expected behavior if the value in the db isnull
? I thought that it would result in something likeBut it looks like it actually just results in a
nil
pointer. Is this expected? The generated type is not*types.NullDecimal
(it's not a pointer type). It's justtypes.NullDecimal
.Beta Was this translation helpful? Give feedback.
All reactions