How do you cast strings to enums with honeysql? Found some discussion from the slack archive, but I can't figure out what is the types/as-other
that is being referenced.
https://clojurians-log.clojureverse.org/honeysql/2021-04-14
Well, I guess I can just add the casting stuff to the string myself
types/as-other
is next.jdbc
not honeysql
ah, that explains it
I had to do this a bit differently than I at first thought anyway. In case someone finds this message later, here's the approach I used https://www.bevuta.com/en/blog/using-postgresql-enums-in-clojure/
Yeah, if you’re using clojure.java.jdbc
, you need to extend ISQLValue
. That’s one of the nice things about next.jdbc
: you can use any of the built-in JDBC types as “hints”, via the next.jdbc.types
namespace: https://cljdoc.org/d/com.github.seancorfield/next.jdbc/1.2.659/api/next.jdbc.types