ignore unrecognized clauses

This commit is contained in:
Justin Kramer 2012-08-07 17:58:51 -04:00
parent a9fcd837ca
commit 212ebd31b4

View file

@ -148,10 +148,13 @@
[{} clauses])] [{} clauses])]
(reduce (reduce
(fn [sql-map [op args]] (fn [sql-map [op args]]
(let [handler (handlers op)] (if-let [handler (handlers op)]
(if (or (#{:where :having} op) (not (coll? args))) (if (or (#{:where :having} op) (not (coll? args)))
(handler sql-map args) (if (nil? args)
(apply handler sql-map args)))) sql-map
(handler sql-map args))
(apply handler sql-map args))
sql-map))
base base
(partition 2 clauses)))) (partition 2 clauses))))