diff --git a/src/honey/sql/pg_json.cljc b/src/honey/sql/pg_json.cljc index 0ad2899..e22b893 100644 --- a/src/honey/sql/pg_json.cljc +++ b/src/honey/sql/pg_json.cljc @@ -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! :#>>) diff --git a/test/honey/sql/pg_json_test.cljc b/test/honey/sql/pg_json_test.cljc index 003541d..d046135 100644 --- a/test/honey/sql/pg_json_test.cljc +++ b/test/honey/sql/pg_json_test.cljc @@ -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]]})))))