Added Postgres specific || operator for concatenating two jsonb values
I am not sure if the operator naming is correct and if it is ok to introduce these PostgreSQL specific operators like this (not so much experienced in Haskell yet). But anyway, I try my luck and hope at least to get feedback on how to do it correctly :D.
Here is the official description of the || jsonb-concatenator operator as well as some more https://www.postgresql.org/docs/11/functions-json.html (maybe I can add some more ;) ).
Thank you.
Also got some conflict with the ||. from Database.Beam. So either the operators should be named different than in Postgres or (like now) hiding the one from Database.Beam and let the user import Postgres specific stuff qualified (like I did it :D 🤷♂️ ). Dont know what is the right solution here.
Ah good point, I totally forgot that ||. is already taken. Unless you can think of a better operator name that makes sense (I can't), then I'd suggest just giving it a name like pgJsonbConcat.
Then for me the question is "where" to put it in code:
- put it close (i.e. maybe at the end of) the
pgJsonbABCthings or - keep it in the order of the Postgres doc (like obviously all the rest is right now) and put it after
(?&)but beforewithoutKey:)
Sry, too much discussion for such a small thing? :D
I don't think it matters much but probably nice to keep the order in line with the Postgres docs where possible.