#398 treat -> as variadic
This commit is contained in:
parent
af69f12630
commit
17319cdd26
2 changed files with 5 additions and 2 deletions
|
|
@ -23,7 +23,7 @@
|
|||
(def at? "The @? operator." (keyword "@?"))
|
||||
(def atat "The @@ operator." (keyword "@@"))
|
||||
|
||||
(sql/register-op! :->)
|
||||
(sql/register-op! :-> :variadic true)
|
||||
(sql/register-op! :->>)
|
||||
(sql/register-op! :#>)
|
||||
(sql/register-op! :#>>)
|
||||
|
|
|
|||
|
|
@ -36,4 +36,7 @@
|
|||
(is (= ["SELECT a @?? b AS x"]
|
||||
(sql/format {:select [[[sut/at? :a :b] :x]]})))
|
||||
(is (= ["SELECT a @@ b AS x"]
|
||||
(sql/format {:select [[[sut/atat :a :b] :x]]})))))
|
||||
(sql/format {:select [[[sut/atat :a :b] :x]]}))))
|
||||
(testing "variadic ops"
|
||||
(is (= ["SELECT a -> b -> c AS x"]
|
||||
(sql/format {:select [[[:-> :a :b :c] :x]]})))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue