From 9d46b48366fd40b6300578386d1dce588c73019c Mon Sep 17 00:00:00 2001 From: Justin Kramer Date: Wed, 7 Aug 2013 18:22:44 -0400 Subject: [PATCH] special case identifier quoting for * --- src/honeysql/format.clj | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/honeysql/format.clj b/src/honeysql/format.clj index 8a9ea9d..fae20f4 100644 --- a/src/honeysql/format.clj +++ b/src/honeysql/format.clj @@ -42,10 +42,11 @@ *quote-identifier-fn*)] (if-not qf x - (if-not split - (qf (name x)) - (let [parts (string/split (name x) #"\.")] - (string/join "." (map qf parts))))))) + (let [qf* #(if (= "*" %) % (qf %))] + (if-not split + (qf* (name x)) + (let [parts (string/split (name x) #"\.")] + (string/join "." (map qf* parts)))))))) (def infix-fns #{"+" "-" "*" "/" "%" "mod" "|" "&" "^"