Pass strings to strop
Converting Character->String involves additional allocations. Passing literal strings avoids that.
This commit is contained in:
parent
f31533d8d6
commit
ac136dab08
1 changed files with 6 additions and 6 deletions
|
|
@ -110,16 +110,16 @@
|
|||
(reduce-kv (fn [m k v]
|
||||
(assoc m k (assoc v :dialect k)))
|
||||
{}
|
||||
{:ansi {:quote #(strop \" % \")}
|
||||
:sqlserver {:quote #(strop \[ % \])}
|
||||
:mysql {:quote #(strop \` % \`)
|
||||
{:ansi {:quote #(strop "\"" % "\"")}
|
||||
:sqlserver {:quote #(strop "[" % "]")}
|
||||
:mysql {:quote #(strop "`" % "`")
|
||||
:clause-order-fn
|
||||
#(add-clause-before % :set :where)}
|
||||
:nrql {:quote #(strop \` % \`)
|
||||
:nrql {:quote #(strop "`" % "`")
|
||||
:col-fn #(if (keyword? %) (subs (str %) 1) (str %))
|
||||
:parts-fn vector}
|
||||
:oracle {:quote #(strop \" % \") :as false}
|
||||
:xtdb {:quote #(strop \" % \")
|
||||
:oracle {:quote #(strop "\"" % "\"") :as false}
|
||||
:xtdb {:quote #(strop "\"" % "\"")
|
||||
:col-fn #(if (keyword? %) (subs (str %) 1) (str %))
|
||||
:parts-fn #(str/split % #"\.")}})))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue