diff --git a/CHANGES.md b/CHANGES.md index afa192f..0a69098 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ * `#sql/inline nil` should produce `NULL`. Fix #221. (@seancorfield) * `#sql/inline :kw` should produce `"kw"`. Fix #224 via PR #225. (@vincent-dm) Note: this introduces a new protocol, `Inlinable`, which controls inline value rendering, and changes the behavior of `#sql/inline :foo/bar` to produce just `"bar"` (where it was probably invalid SQL before). * Alias expressions `[:col :alias]` are now checked to have exactly two elements. Fix #226. +* Allow `where` and `merge-where` to be given no predicates. Fix #228. ## 0.9.3 diff --git a/src/honeysql/helpers.cljc b/src/honeysql/helpers.cljc index a2fff11..9a9dced 100644 --- a/src/honeysql/helpers.cljc +++ b/src/honeysql/helpers.cljc @@ -78,7 +78,7 @@ [logic-op preds] (if (keyword? (first preds)) [(first preds) (rest preds)] [:and preds]) - pred (if (= 1 (count preds)) + pred (if (>= 1 (count preds)) (first preds) (into [logic-op] preds))] [m pred logic-op]))