This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-02
Channels
- # announcements (1)
- # asami (89)
- # aws (10)
- # babashka (41)
- # beginners (71)
- # calva (25)
- # cider (3)
- # clj-kondo (65)
- # cljdoc (15)
- # cljs-dev (3)
- # cljsrn (8)
- # clojure (56)
- # clojure-europe (44)
- # clojure-italy (1)
- # clojure-nl (2)
- # clojure-uk (48)
- # clojured (7)
- # clojurescript (17)
- # conjure (6)
- # cursive (3)
- # datomic (9)
- # emacs (11)
- # events (3)
- # fulcro (3)
- # helix (3)
- # honeysql (7)
- # hugsql (6)
- # introduce-yourself (2)
- # jobs (2)
- # kaocha (4)
- # luminus (1)
- # nrepl (2)
- # off-topic (10)
- # pathom (7)
- # philosophy (3)
- # polylith (27)
- # reagent (18)
- # reitit (3)
- # remote-jobs (7)
- # reveal (3)
- # shadow-cljs (9)
- # slack-help (5)
- # tools-deps (9)
- # vim (48)
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