QRM and "wrapped" complex types (structs and slices) | Custom scanner for complex types? #368
Unanswered
josephbuchma
asked this question in
Q&A
Replies: 1 comment 1 reply
-
SELECT(
...
BillOfMaterialHdr.ID.IS_NOT_NULL.AS("set"),
) Now if |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using ogen OpenAPI code generator, and it generates types like
where
BillOfMaterialHdr
is another struct. So when you have an optionalBillOfMaterialHdr
in request or response payload, it will useOptBillOfMaterialHdr
(as opposed to more common approach of*BillOfMaterialHdr
withomitempty
json tag option).In essense, I'd like to be able to store query results in a struct like this:
And when
Bom.Value
is populated, it should also setBom.Set
totrue
.As far as I can tell, it is not possible to implement something like
sql.Scanner
for complex types at the moment, isn't it?I'd love to contribute a PR for this feature, and would appreciate any guidance on how to get this done.
Beta Was this translation helpful? Give feedback.
All reactions