;; copyright (c) 2022 sean corfield, all rights reserved (ns honey.sql.pg-ops "Register all the PostgreSQL JSON/JSONB operators and provide convenient Clojure names for those ops. In addition, provide names for the PostgreSQL regex operators as well. For the eleven that cannot be written directly as symbols, use mnemonic names: hash for #, at for @, and tilde for ~. For the six of those that cannot be written as keywords, invoke the `keyword` function instead. Those latter eight (`at>`, ` ->> -]) (:require [honey.sql :as sql])) ;; see https://www.postgresql.org/docs/current/functions-json.html (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! :->>) (sql/register-op! :#>) (sql/register-op! :#>>) (sql/register-op! at>) (sql/register-op!