This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-04
Channels
- # announcements (2)
- # beginners (30)
- # calva (30)
- # cider (10)
- # cljs-dev (4)
- # clojure (59)
- # clojure-nl (2)
- # clojurescript (21)
- # cursive (22)
- # datascript (3)
- # datomic (5)
- # duct (5)
- # figwheel-main (1)
- # flambo (2)
- # fulcro (8)
- # jackdaw (1)
- # joker (9)
- # off-topic (24)
- # pathom (1)
- # re-frame (2)
- # rewrite-clj (4)
- # shadow-cljs (163)
- # sql (14)
- # tools-deps (6)
- # vim (24)
- # yada (3)
Seems like https://github.com/clojure/java.jdbc/blob/0801bc07ce2f01984f6a6bc03504fef73ac02197/src/main/clojure/clojure/java/jdbc.clj#L149-L201 would need additional definitions
I've never heard of it -- but if you have the JDBC driver in your deps, you can just provide :classname
with the JDBC driver class name.
{:dbtype "Presto" :dbname "whatever" :classname "com.presto.JDBCDriver" ...}
or whatever class name it has.
I must be missing something
(j/with-db-connection [conn {:dbtype "jdbc:presto"
:dbname "default"
:classname "com.facebook.presto.jdbc.PrestoDriver"
:user "test"
:password "secret"}]
conn)
;;
;; java.sql.SQLException: No suitable driver found for jdbc:jdbc:
(j/get-connection {:dbtype "jdbc:presto"
:dbname "default"
:classname "com.facebook.presto.jdbc.PrestoDriver"
:user "test"
:password "secret"})
;; java.sql.SQLException: No suitable driver found for jdbc:jdbc:
;; looks like jdbc: is repeated?
Remove jdbc:
from the :dbtype
.
And you made sure you added the Facebook JDBC driver to your dependencies (in project.clj
or deps.edn
)?
I tried removing jdbc:
and still get
Unhandled java.sql.SQLException
No suitable driver found for jdbc:jdbc:
I can (import '[com.facebook.presto.jdbc PrestoDriver])
in the same nsthis did seem right: https://github.com/prestodb/presto/blob/master/presto-jdbc/src/main/java/com/facebook/presto/jdbc/PrestoDriver.java#L35-L36