This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-30
Channels
- # announcements (20)
- # asami (26)
- # babashka (10)
- # babashka-sci-dev (18)
- # beginners (81)
- # biff (6)
- # calva (6)
- # cider (1)
- # clerk (1)
- # clj-kondo (34)
- # clojure (50)
- # clojure-belgium (1)
- # clojure-berlin (6)
- # clojure-europe (20)
- # clojure-nl (1)
- # clojure-norway (22)
- # clojure-uk (2)
- # clojurescript (1)
- # clr (4)
- # community-development (3)
- # data-science (8)
- # datomic (3)
- # gratitude (1)
- # honeysql (6)
- # instaparse (2)
- # jobs (1)
- # jobs-discuss (13)
- # kaocha (7)
- # london-clojurians (1)
- # lsp (6)
- # malli (8)
- # matcher-combinators (9)
- # missionary (3)
- # nbb (8)
- # off-topic (20)
- # pathom (16)
- # polylith (2)
- # practicalli (3)
- # rdf (1)
- # re-frame (7)
- # reagent (3)
- # releases (2)
- # reveal (6)
- # rewrite-clj (22)
- # shadow-cljs (64)
- # tools-build (7)
- # xtdb (13)
I want to convert boolean values to bit values for DBs that don't have BOOLEAN values (sqlserver, oracle) in a consistent way (say, convert INT), while also keeping TRUE/FALSE values for dbs with native boolean support. a) Is this supported with HoneySQL? It doesn't appear to be. b) would registering a new dialect be a good approach, or should this be handled in application code?
I'm not even sure what you're asking in terms of HoneySQL -- bit/boolean conversion happens at the JDBC level.
MySQL does not have a BOOLEAN data type, but its JDBC driver converts to/from Boolean just fine for a BIT(1) field. It's not even done in next.jdbc
.
For a JDBC driver that doesn't do the conversion you want, you can generally extend the protocols in next.jdbc
to "force" the conversion but you have to be a bit careful since such conversions will be global to your application.