From 9eb87987ed00d4b4feb303e72c48a60fda4d1431 Mon Sep 17 00:00:00 2001 From: Starks Date: Wed, 22 Jul 2015 17:14:10 +0200 Subject: [PATCH] quoting of AS clauses should not be splitted on "." quoting of AS clauses should not be splitted on "." --- test/honeysql/core_test.clj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/honeysql/core_test.clj b/test/honeysql/core_test.clj index cea3b31..7de548b 100644 --- a/test/honeysql/core_test.clj +++ b/test/honeysql/core_test.clj @@ -127,3 +127,10 @@ :from [:customers] :where [:in :id :?ids]} {:ids values}))))))) + +(deftest test-quoting + (testing ":quoting :ansi" + (is (= ["SELECT \"b\".\"bla\" AS \"bla.bla\", \"b\".\"bla\" AS \"blu.blu\" FROM \"baz\" \"b\"" ] + (-> (select [:b.bla :bla.bla] [:b.bla "blu.blu"]) + (from [:baz :b]) + (sql/format :quoting :ansi))))))