summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-20 18:21:23 +1000
committerCarlo Zancanaro <carlo@clearboxsystems.com.au>2013-06-20 18:21:23 +1000
commit7377eee7fe3c81522680151bfd5ac3b120b87a30 (patch)
treec5859680844a1ef51d6618e00a0c19b6b480441d
parentb95f8d9a6a88d29266fc6bde97050c8a61dfa365 (diff)
Clean up, add an assertion.
-rw-r--r--src/clojure_sql/compiler.clj4
1 files 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)