From 3b97fd4f0697a342e75bb16bbd72327ff3de3ec8 Mon Sep 17 00:00:00 2001 From: Justin Kramer Date: Wed, 22 Aug 2012 11:23:00 -0400 Subject: [PATCH] allow string aliases --- src/honeysql/format.clj | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/honeysql/format.clj b/src/honeysql/format.clj index 9dd4cfb..8058945 100644 --- a/src/honeysql/format.clj +++ b/src/honeysql/format.clj @@ -151,7 +151,9 @@ ;; alias (str (to-sql (first x)) " AS " - (to-sql (second x))))) + (if (string? (second x)) + (str "\"" (second x) "\"") + (to-sql (second x)))))) SqlCall (-to-sql [x] (binding [*fn-context?* true] (let [fn-name (name (.name x))