From 7377eee7fe3c81522680151bfd5ac3b120b87a30 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Thu, 20 Jun 2013 18:21:23 +1000 Subject: Clean up, add an assertion. --- src/clojure_sql/compiler.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clojure_sql/compiler.clj b/src/clojure_sql/compiler.clj index 881a794..5bec649 100644 --- a/src/clojure_sql/compiler.clj +++ b/src/clojure_sql/compiler.clj @@ -277,8 +277,8 @@ (defn update! [db {:keys [tables fields where joins]} partial-record] (assert (= (count tables) 1) "Cannot delete from a multiple-table query") - (assert (seq (set/intersection (keys partial-record) - (keys fields))) "At least one field must be being updated") + (assert (seq (set/intersection (set (keys partial-record)) + (set (keys fields)))) "At least one field must be being updated") (let [fix-expr (partial walk/prewalk (fn [x] (if (vector? x) (second x) -- cgit v1.2.3