From 90f3088c2477d64d8406da16c99cfc21ce976b17 Mon Sep 17 00:00:00 2001 From: David Powell Date: Fri, 12 Apr 2013 19:11:33 +0200 Subject: [PATCH] Don't upper case function calls To allow for case-sensitive function names --- src/honeysql/format.clj | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/honeysql/format.clj b/src/honeysql/format.clj index 250089f..41afd58 100644 --- a/src/honeysql/format.clj +++ b/src/honeysql/format.clj @@ -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))) \ No newline at end of file + (str "OFFSET " (to-sql offset)))