Fork me on GitHub
#honeysql
<
2022-11-22
>
marciol21:11:48

Hey folks, I have a query that selects a column of enum type. I would now if there is a way to make it return a keyword instead of a string as it is doing right now.

seancorfield22:11:07

As an FYI, how data is returned from JDBC is not related to HoneySQL -- it's about the JDBC wrapper you're using (so this Q belongs in #C1Q164V29). Depending on the wrapper, you could probably arrange for such columns to be auto-coerced but it would require runtime reflection on the metadata of the columns in the ResultSet but I think I would avoid that generic approach and explicitly post-process certain known columns directly.

marciol22:11:10

Yes, it's what I'm gonna do. @U3Y18N0UC told me that this is the approach he uses.

1
marciol21:11:09

I think that I gonna use malli to coerce each row. thx