Don't upper case function calls
To allow for case-sensitive function names
This commit is contained in:
parent
f13eeacff8
commit
90f3088c24
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)) ")"))
|
||||
|
|
@ -283,4 +282,4 @@
|
|||
(str "LIMIT " (to-sql limit)))
|
||||
|
||||
(defmethod format-clause :offset [[_ offset] _]
|
||||
(str "OFFSET " (to-sql offset)))
|
||||
(str "OFFSET " (to-sql offset)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue