Merge pull request #4 from djpowell/master
Preserve case of function calls
This commit is contained in:
commit
c405bda740
1 changed files with 4 additions and 5 deletions
|
|
@ -54,11 +54,10 @@
|
|||
")"))
|
||||
|
||||
(defmethod fn-handler :default [op & args]
|
||||
(let [op-upper (string/upper-case op)
|
||||
args (map to-sql args)]
|
||||
(let [args (map to-sql args)]
|
||||
(if (infix-fns op)
|
||||
(paren-wrap (string/join (str " " op-upper " ") args))
|
||||
(str op-upper (paren-wrap (comma-join args))))))
|
||||
(paren-wrap (string/join (str " " op " ") args))
|
||||
(str op (paren-wrap (comma-join args))))))
|
||||
|
||||
(defmethod fn-handler "count-distinct" [_ & args]
|
||||
(str "COUNT(DISTINCT " (comma-join (map to-sql args)) ")"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue