summaryrefslogtreecommitdiff
path: root/src/clojure_sql
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-20 18:18:15 +1000
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-20 18:18:15 +1000
commitb95f8d9a6a88d29266fc6bde97050c8a61dfa365 (patch)
treed28eeb9ce0e0c8312c6f349b8a8255eb1e47e0fe /src/clojure_sql
parentb1906aca3e39b81e6b39db5dd1dce98996e3df76 (diff)
Well, that didn't work. Whatever.
Diffstat (limited to 'src/clojure_sql')
-rw-r--r--src/clojure_sql/core.clj27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/clojure_sql/core.clj b/src/clojure_sql/core.clj
index e77eeb0..ebdc01f 100644
--- a/src/clojure_sql/core.clj
+++ b/src/clojure_sql/core.clj
@@ -60,17 +60,18 @@
-(try
- (require '[clojure.java.jdbc :as jdbc])
- (defn use-jdbc! [connection-string]
- (set-query-executor! (fn [type query]
- (jdbc/with-connection connection-string
- (case type
- :query (jdbc/with-query-results results query
- (vec results))
- :insert (jdbc/do-prepared-return-keys (first query) (next query))
- (jdbc/do-prepared (first query) (next query)))))))
-
- (catch Exception e
- ))
+
+
+
+;; FIXME: how to do this better? With some discovery, maybe?
+
+(require '[clojure.java.jdbc :as jdbc])
+(defn use-jdbc! [connection-string]
+ (set-query-executor! (fn [type query]
+ (jdbc/with-connection connection-string
+ (case type
+ :query (jdbc/with-query-results results query
+ (vec results))
+ :insert (jdbc/do-prepared-return-keys (first query) (next query))
+ (jdbc/do-prepared (first query) (next query)))))))