Fork me on GitHub
#sql
<
2022-12-19
>
d._.b22:12:01

I was using hikari-cp's clojure wrapper. What's the correct way to construct a HikariDataSource with hikari config values for use with next.jdbc? I was using jdbc.conn/->pool, but that only takes a class, and I would like to init the hikari datasource with my hikari configuration.

d._.b22:12:58

(def conn (atom nil)

(reset! conn (let [ds (jdbc/get-datasource db-spec)] (hikari/make-datasource (assoc hikari-config :datasource ds))))

d._.b22:12:03

that look right to you?

seancorfield22:12:35

No idea -- I don't use the hikari-cp wrapper.

dumrat13:12:59

btw, you can directly use the hikari jar instead of the wrapper

seancorfield20:12:38

☝️:skin-tone-2: Yeah, I'm not sure what value that hikari-cp wrapper provides, TBH.