simplify call to parameterizer
This commit is contained in:
parent
7115456d9e
commit
27b906859d
1 changed files with 3 additions and 6 deletions
|
|
@ -45,8 +45,8 @@
|
||||||
:oracle #(str \" % \")})
|
:oracle #(str \" % \")})
|
||||||
|
|
||||||
(def ^:private parameterizers
|
(def ^:private parameterizers
|
||||||
{:postgresql #(str "$" @*all-param-counter*)
|
{:postgresql #(str "$" (swap! *all-param-counter* inc))
|
||||||
:jdbc "?"})
|
:jdbc (constantly "?")})
|
||||||
|
|
||||||
(def ^:dynamic *quote-identifier-fn* nil)
|
(def ^:dynamic *quote-identifier-fn* nil)
|
||||||
(def ^:dynamic *parameterizer* nil)
|
(def ^:dynamic *parameterizer* nil)
|
||||||
|
|
@ -316,10 +316,7 @@
|
||||||
[x (keyword (str "_" (swap! *param-counter* inc)))])]
|
[x (keyword (str "_" (swap! *param-counter* inc)))])]
|
||||||
(swap! *param-names* conj pname)
|
(swap! *param-names* conj pname)
|
||||||
(swap! *params* conj x)
|
(swap! *params* conj x)
|
||||||
(swap! *all-param-counter* inc)
|
(*parameterizer*))))
|
||||||
(if (fn? *parameterizer*)
|
|
||||||
(*parameterizer*)
|
|
||||||
*parameterizer*))))
|
|
||||||
|
|
||||||
(defn sqlable? [x]
|
(defn sqlable? [x]
|
||||||
(satisfies? ToSql x))
|
(satisfies? ToSql x))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue