This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-31
Channels
- # aleph (38)
- # beginners (91)
- # boot (4)
- # cider (20)
- # clara (11)
- # cljs-dev (4)
- # clojure (179)
- # clojure-greece (1)
- # clojure-italy (16)
- # clojure-portugal (1)
- # clojure-russia (1)
- # clojure-sanfrancisco (1)
- # clojure-spec (183)
- # clojure-uk (50)
- # clojurescript (111)
- # core-async (24)
- # cursive (4)
- # datascript (11)
- # datomic (29)
- # fulcro (120)
- # gorilla (2)
- # jobs (1)
- # keechma (2)
- # keyboards (26)
- # leiningen (4)
- # luminus (7)
- # lumo (15)
- # off-topic (2)
- # onyx (31)
- # parinfer (12)
- # portkey (1)
- # protorepl (1)
- # re-frame (50)
- # reagent (106)
- # remote-jobs (1)
- # ring-swagger (2)
- # rum (10)
- # spacemacs (17)
- # sql (16)
- # test-check (1)
- # yada (2)
@gdeer81 [org.clojure/java.jdbc "0.7.1"]
is available from Maven now, so you can try that connection string out again.
Excellent that's much better, now I guess I should open up an issue on migratus to bump their version of java.jdbc
@plins Not at present, no. I've been looking at ways to generically obtain the actual SQL statement from the PreparedStatement underneath but that doesn't seem to be possible. For query
there's :explain?
and :explain-fn
which are mostly generic (but don't always show the actual SQL, just the plan used).
Feel free to create an issue on JIRA for me to look at alternative ways of providing access to the actual SQL statement used.
I've also been trying to play with Sayid to see if I can replace blackwater (sql benchmarking) and my hand rolled logging since it will be a more generic solution. the only downside is it only works with emacs
@bja I ran across another one that proxies all the JDBC calls -- good to know there's more than one. Let me see if I can dig up the other project...
Recently I added JDBC instrumentation feature to Preflex: https://github.com/kumarshantanu/preflex/blob/master/doc/intro.md#instrumenting-a-jdbc-connection-pool-any-javaxsqldatasource-instance — you can instrument a javax.sql.DataSource
or java.sql.Connection
and do custom stuff inside the wrapper
Here's the proxy / logging project I looked at before https://github.com/ttddyy/datasource-proxy
It can do a lot more than just logging.
I'll say that I simply use a wrapper for jdbc/query and jdbc/execute! that takes honeysql maps and, conditionally based on a dynamic variable, will log the statement, explain, etc
it's a 5 minute hack and anyone who is already using a query building library probably has something similar (or at least the entry point for it)