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
Uh oh!
There was an error while loading. Please reload this page.
-
We are using ogen OpenAPI code generator, and it generates types like
where
BillOfMaterialHdris another struct. So when you have an optionalBillOfMaterialHdrin request or response payload, it will useOptBillOfMaterialHdr(as opposed to more common approach of*BillOfMaterialHdrwithomitemptyjson tag option).In essense, I'd like to be able to store query results in a struct like this:
And when
Bom.Valueis populated, it should also setBom.Settotrue.As far as I can tell, it is not possible to implement something like
sql.Scannerfor 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