Test that tuples work correctly
Thanks to @jetmind who gave this test in #168
This commit is contained in:
parent
62c4760c6a
commit
a0b73cdcc6
1 changed files with 6 additions and 0 deletions
|
|
@ -129,3 +129,9 @@
|
|||
:with [[[:bar {:columns [:spam :eggs]}]
|
||||
{:values [[1 2] [3 4] [5 6]]}]]})
|
||||
["WITH bar (spam, eggs) AS (VALUES (?, ?), (?, ?), (?, ?)) SELECT foo FROM bar1 UNION ALL SELECT foo FROM bar2" 1 2 3 4 5 6])))
|
||||
|
||||
(deftest format-tuples
|
||||
(is (= ["SELECT id FROM table WHERE (a, b) = (?, ?)" 1 2]
|
||||
(format {:select [:id]
|
||||
:from [:table]
|
||||
:where [:= [:a :b] [1 2]]}))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue