Demonstrate that empty arrays do not generate the right SQL

This commit is contained in:
Chris Kilding 2019-05-28 18:02:04 +01:00
parent be203e9086
commit ed223a5758

View file

@ -83,6 +83,10 @@
["SELECT id FROM foo WHERE EXISTS (SELECT ? FROM bar WHERE deleted)" 1])))
(deftest array-test
(is (= (format {:insert-into :foo
:columns [:baz]
:values [[(sql/array [])]]})
["INSERT INTO foo (baz) VALUES ('{}')"]))
(is (= (format {:insert-into :foo
:columns [:baz]
:values [[(sql/array [1 2 3 4])]]})