Fix a few calls
This commit is contained in:
parent
7d9a53127d
commit
70c22add30
1 changed files with 3 additions and 5 deletions
|
|
@ -40,8 +40,6 @@
|
||||||
(get-connection ^AutoCloseable [this]))
|
(get-connection ^AutoCloseable [this]))
|
||||||
(defprotocol Preparable
|
(defprotocol Preparable
|
||||||
(prepare ^PreparedStatement [this sql-params opts]))
|
(prepare ^PreparedStatement [this sql-params opts]))
|
||||||
(defprotocol Transactable
|
|
||||||
(transact [this f opts]))
|
|
||||||
(defprotocol WithOptions
|
(defprotocol WithOptions
|
||||||
(get-options [this]))
|
(get-options [this]))
|
||||||
|
|
||||||
|
|
@ -93,7 +91,7 @@
|
||||||
(reset! state commit?))
|
(reset! state commit?))
|
||||||
con)
|
con)
|
||||||
|
|
||||||
(defn- transact*
|
(defn transact*
|
||||||
""
|
""
|
||||||
[con transacted f opts]
|
[con transacted f opts]
|
||||||
(let [{:keys [isolation read-only? rollback-only?]} opts
|
(let [{:keys [isolation read-only? rollback-only?]} opts
|
||||||
|
|
@ -151,7 +149,7 @@
|
||||||
|
|
||||||
(defmacro in-transaction
|
(defmacro in-transaction
|
||||||
[[sym con opts] & body]
|
[[sym con opts] & body]
|
||||||
`(transact ~con (fn [~sym] ~@body) ~opts))
|
`(transact* ~con (fn [~sym] ~@body) ~opts))
|
||||||
|
|
||||||
(def ^:private classnames
|
(def ^:private classnames
|
||||||
"Map of subprotocols to classnames. dbtype specifies one of these keys.
|
"Map of subprotocols to classnames. dbtype specifies one of these keys.
|
||||||
|
|
@ -335,7 +333,7 @@
|
||||||
DataSource
|
DataSource
|
||||||
(prepare [this sql-params opts] (prepare (get-connection this) sql-params opts))
|
(prepare [this sql-params opts] (prepare (get-connection this) sql-params opts))
|
||||||
Object
|
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
|
(comment
|
||||||
(get-connection {:dbtype "derby" :dbname "clojure_test" :create true} {})
|
(get-connection {:dbtype "derby" :dbname "clojure_test" :create true} {})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue