summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)))))))