-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PostgreSQL JSON operators by default? #398
Comments
The docs here at postgrestutorial explains the -> and ->> operator in a really concise way: |
https://www.postgresql.org/docs/current/functions-json.html lists a lot of operators, including several that cannot be written directly as Clojure keywords (or symbols) so I'll need a convenient way for PG users to get at these using symbolic names. I think I might add a new |
@introom If you work with develop version and |
Hi @seancorfield , thanks for the update! Minor question, why honey.sql.pg-json instead of honey.sq.pg ? pg-json sounds too fine-grained. |
Because most PostgreSQL stuff is already supported directly. This new namespace is specifically because there are JSONB operators that have "unwritable" names -- and I don't want those four names in |
Thanks for this, this will be very convenient and help reduce some boilerplate code for PG JSON(B) operations. Just a heads up, |
Ah, good point @dekelpilli - thank you! I'll update that shortly. Should any of the others be variadic? (I can't really tell from the docs) |
Looks like |
I'm coming around to having vars in |
It turns out that |
This is unrelated to json but what about the regexp operators (def regex "Keyword corresponding to regex matching operation" (keyword "~"))
(def iregex "Keyword corresponding to case-insensitive regex matching operation" (keyword "~*"))
(honey/register-op! regex)
(honey/register-op! iregex) |
I'm adding the four regex operators ( Accordingly, I'm renaming the namespace to |
->
,->>
, and various others are a bit of a pain to use without registering them all or using:raw
.The text was updated successfully, but these errors were encountered: