From 212ebd31b40fd8c3576cd6014dacbd48fdbef734 Mon Sep 17 00:00:00 2001 From: Justin Kramer Date: Tue, 7 Aug 2012 17:58:51 -0400 Subject: [PATCH] ignore unrecognized clauses --- src/honeysql/core.clj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/honeysql/core.clj b/src/honeysql/core.clj index e62bcac..81dadc8 100644 --- a/src/honeysql/core.clj +++ b/src/honeysql/core.clj @@ -148,10 +148,13 @@ [{} clauses])] (reduce (fn [sql-map [op args]] - (let [handler (handlers op)] + (if-let [handler (handlers op)] (if (or (#{:where :having} op) (not (coll? args))) - (handler sql-map args) - (apply handler sql-map args)))) + (if (nil? args) + sql-map + (handler sql-map args)) + (apply handler sql-map args)) + sql-map)) base (partition 2 clauses))))