diff --git a/src/honey/sql/pg_json.cljc b/src/honey/sql/pg_json.cljc index e22b893..a0af43c 100644 --- a/src/honey/sql/pg_json.cljc +++ b/src/honey/sql/pg_json.cljc @@ -2,26 +2,36 @@ (ns honey.sql.pg-json "Register all the PostgreSQL JSON/JSONB operators - and provide convenient Clojure names for those ops - that cannot be written as keywords or symbols directly." + and provide convenient Clojure names for those ops. + + For the seven that cannot be written directly as + symbols, use mnemonic names: hash for # and at for @. + + For the four of those that cannot be written as + keywords, invoke the `keyword` function instead. + + Those latter four (`at>`, ` ->> -]) (:require [honey.sql :as sql])) ;; see https://www.postgresql.org/docs/current/functions-json.html -;; :-> -;; :->> -;; :#> -;; :#>> -(def at> "The @> operator." (keyword "@>")) -(def "The -> operator." :->) +(def ->> "The ->> operator." :->>) +(def hash> "The #> operator." :#>) +(def hash>> "The #>> operator." :#>>) +(def at> "The @> operator." (keyword "@>")) +(def :variadic true) (sql/register-op! :->>)