From bece0f1fd136c85d6327a634bab87810a07686c6 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sat, 12 Jun 2021 18:57:36 -0700 Subject: [PATCH] Fixes #327 by correcting generic-1 helper --- CHANGELOG.md | 1 + src/honey/sql/helpers.cljc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c048c37..696c16f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ * 2.0.next in progress * Fix #328 by adding `:distinct` as special syntax, affecting an expression. * Address #327 by changing "unknown clause" error to including mention of "nil values" (which are also illegal). + * Fix #327 by making single-argument helpers consistent with multi-argument helpers. * Support PostgreSQL's `&&` array operator. * Clarify how to `SELECT` a function expression (in **Getting Started**). diff --git a/src/honey/sql/helpers.cljc b/src/honey/sql/helpers.cljc index 8c9f40d..98aa5d7 100644 --- a/src/honey/sql/helpers.cljc +++ b/src/honey/sql/helpers.cljc @@ -87,7 +87,7 @@ (helper-merge {} k args))) (defn- generic-1 [k [data arg]] - (if (some? arg) + (if (map? data) (assoc data k arg) (assoc {} k data)))