From 0e2aae4a0054673d008f70eedcbc5cebb032b864 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 31 Jan 2021 05:31:10 -0800 Subject: [PATCH] Fix :lift and test to use wrapper --- src/honey/sql.cljc | 3 ++- test/honey/sql/helpers_test.cljc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/honey/sql.cljc b/src/honey/sql.cljc index a1c275b..ea4fd40 100644 --- a/src/honey/sql.cljc +++ b/src/honey/sql.cljc @@ -563,7 +563,8 @@ (into [(str "INTERVAL " sql " " (sql-kw units))] params))) :lift (fn [_ [x]] - ["?" x]) + ["?" (with-meta (constantly x) + {::wrapper (fn [fx _] (fx))})]) :nest (fn [_ [x]] (format-expr x {:nested? true})) diff --git a/test/honey/sql/helpers_test.cljc b/test/honey/sql/helpers_test.cljc index 034b716..d610e5f 100644 --- a/test/honey/sql/helpers_test.cljc +++ b/test/honey/sql/helpers_test.cljc @@ -82,7 +82,7 @@ (-> (insert-into :foo) (columns :bar) - (values [[:lift {:baz "my-val"}]]) + (values [[[:lift {:baz "my-val"}]]]) sql/format))) (is (= ["INSERT INTO foo (a, b, c) VALUES (?, ?, ?), (?, ?, ?)" "a" "b" "c" "a" "b" "c"]