I’m currently using clojure.java.jdbc
but would like to gradually shift over to next.jdbc
. When my app starts, it uses Luminus’ conman
to create a hikari-cp
connection pool using the statement below.
(conman/connect!
{:jdbc-url (str "jdbc:mysql://" host
":" port
"/" (ring.util.codec/url-encode name)
"?user=" (ring.util.codec/url-encode user)
"&password=" (ring.util.codec/url-encode password)
"&serverTimezone=UTC"
"&jdbcCompliantTruncation=false"
"&useUnicode=true"
"&characterEncoding=utf8"
"&connectionTimeZone=SERVER"
"&useSSL=false"
)
:maximum-pool-size 5})
I can run a clojure.java.jdbc
query against that pool. However, I can’t use the pool created with this statement to run a query through next.jdbc
, I get the error
Execution error (ExceptionInfo) at next.jdbc.connection/spec->url+etc (connection.clj:199).
Unknown dbtype:
Is it possible to somehow share a connection pool between the two jdbc libraries? By using a connection config that is compatible between both versions?