Merge pull request #195 from madvas/master

Fix #193
This commit is contained in:
Michael Blume 2018-02-10 23:50:22 -08:00 committed by GitHub
commit 3588768970
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,8 @@
(def ^:dynamic *allow-dashed-names?* false)
(def ^:dynamic *name-transform-fn* nil)
(def ^:private quote-fns
{:ansi #(str \" (string/replace % "\"" "\"\"") \")
:mysql #(str \` (string/replace % "`" "``") \`)
@ -61,7 +63,10 @@
(string/replace s "-" "_"))
(defn quote-identifier [x & {:keys [style split] :or {split true}}]
(let [name-transform-fn (if *allow-dashed-names?* identity undasherize)
(let [name-transform-fn (cond
*name-transform-fn* *name-transform-fn*
*allow-dashed-names?* identity
:else undasherize)
qf (if style
(quote-fns style)
*quote-identifier-fn*)