Fix :lift and test to use wrapper
This commit is contained in:
parent
c92656389b
commit
0e2aae4a00
2 changed files with 3 additions and 2 deletions
|
|
@ -563,7 +563,8 @@
|
||||||
(into [(str "INTERVAL " sql " " (sql-kw units))] params)))
|
(into [(str "INTERVAL " sql " " (sql-kw units))] params)))
|
||||||
:lift
|
:lift
|
||||||
(fn [_ [x]]
|
(fn [_ [x]]
|
||||||
["?" x])
|
["?" (with-meta (constantly x)
|
||||||
|
{::wrapper (fn [fx _] (fx))})])
|
||||||
:nest
|
:nest
|
||||||
(fn [_ [x]]
|
(fn [_ [x]]
|
||||||
(format-expr x {:nested? true}))
|
(format-expr x {:nested? true}))
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
(->
|
(->
|
||||||
(insert-into :foo)
|
(insert-into :foo)
|
||||||
(columns :bar)
|
(columns :bar)
|
||||||
(values [[:lift {:baz "my-val"}]])
|
(values [[[:lift {:baz "my-val"}]]])
|
||||||
sql/format)))
|
sql/format)))
|
||||||
(is (= ["INSERT INTO foo (a, b, c) VALUES (?, ?, ?), (?, ?, ?)"
|
(is (= ["INSERT INTO foo (a, b, c) VALUES (?, ?, ?), (?, ?, ?)"
|
||||||
"a" "b" "c" "a" "b" "c"]
|
"a" "b" "c" "a" "b" "c"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue