From 70c22add308707e03c9f47f28b270919d12d89e4 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Thu, 10 Jan 2019 18:33:12 -0800 Subject: [PATCH] Fix a few calls --- src/next/jdbc.clj | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/next/jdbc.clj b/src/next/jdbc.clj index e19f0ca..8db9e85 100644 --- a/src/next/jdbc.clj +++ b/src/next/jdbc.clj @@ -40,8 +40,6 @@ (get-connection ^AutoCloseable [this])) (defprotocol Preparable (prepare ^PreparedStatement [this sql-params opts])) -(defprotocol Transactable - (transact [this f opts])) (defprotocol WithOptions (get-options [this])) @@ -93,7 +91,7 @@ (reset! state commit?)) con) -(defn- transact* +(defn transact* "" [con transacted f opts] (let [{:keys [isolation read-only? rollback-only?]} opts @@ -151,7 +149,7 @@ (defmacro in-transaction [[sym con opts] & body] - `(transact ~con (fn [~sym] ~@body) ~opts)) + `(transact* ~con (fn [~sym] ~@body) ~opts)) (def ^:private classnames "Map of subprotocols to classnames. dbtype specifies one of these keys. @@ -335,7 +333,7 @@ DataSource (prepare [this sql-params opts] (prepare (get-connection this) sql-params opts)) Object - (prepare [this sql-params opts] (prepare (get-datasource this) sql-params opts))) + (prepare [this sql-params opts] (prepare (get-datasource this opts) sql-params opts))) (comment (get-connection {:dbtype "derby" :dbname "clojure_test" :create true} {})