From 6a0eacdd5fc301055b0e18be31a034c7304ea0a1 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Tue, 13 Sep 2016 19:50:50 -0700 Subject: [PATCH] Address #138 : add priority for union/union-all By prioritizing union / union-all to happen early on, complex queries with order by / limit / offset etc will be correctly formatted _after_ the union / union-all clause has been formatted. --- src/honeysql/format.cljc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/honeysql/format.cljc b/src/honeysql/format.cljc index d9509d9..43b184e 100644 --- a/src/honeysql/format.cljc +++ b/src/honeysql/format.cljc @@ -174,7 +174,9 @@ (def default-clause-priorities "Determines the order that clauses will be placed within generated SQL" - {:with 30 + {:union 20 + :union-all 25 + :with 30 :with-recursive 40 :select 50 :insert-into 60