summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-07-01 09:54:56 +1000
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-07-01 09:54:56 +1000
commit9036377148afb61a492c04baf3d82c2c63175bb4 (patch)
tree3e0647ceaf575fbe968dd992e7cf21791b533e4e /src
parentdd262c012993ea7033607379b06968a279efa1f3 (diff)
Change the condition for union compatible (require projections first)
Diffstat (limited to 'src')
-rw-r--r--src/clojure_sql/dsl.clj3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clojure_sql/dsl.clj b/src/clojure_sql/dsl.clj
index 0a05763..5eae2d7 100644
--- a/src/clojure_sql/dsl.clj
+++ b/src/clojure_sql/dsl.clj
@@ -379,7 +379,8 @@
(assoc query :drop n))))
(defn ^:private union-compatible? [& queries]
- (apply = (map (comp set keys :fields) queries)))
+ (and (every? (comp seq keys :fields) queries)
+ (apply = (map (comp set keys :fields) queries))))
(defn union
"Combine the results of two queries"