-
Notifications
You must be signed in to change notification settings - Fork 10
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 JSON Processing Functions #3
Comments
I added the following in version 0.4.0:
|
Any chance you can add |
And |
@tmdomingues I recall that when I was looking into Though I can take a look at jOOQ's own @mkurz It's a similar problem as the above with If you either have any suggestions how the signature of these functions would look, or an example of how you could imagine using these in your code, I'm very eager to learn about it! Then, if I have a better view on this, I think it would be easier to figure out how to implement these. (By the way, you're also free to contribute a pull request if you have a good idea on what this would look like ;-) Edit: so yes, Edit2: example queries & datasets help a lot too with trying to see how to implement such functions. :) |
https://www.postgresql.org/docs/11/functions-json.html#FUNCTIONS-JSON-PROCESSING-TABLE
It would be very nice to also add JSON processing functions, besides the operators.
json_array_length(json)
jsonb_array_length(jsonb)
json_each(json)
jsonb_each(jsonb)
json_each_text(json)
jsonb_each_text(jsonb)
json_extract_path(from_json json, VARIADIC path_elems text[])
jsonb_extract_path(from_json jsonb, VARIADIC path_elems text[])
json_extract_path_text(from_json json, VARIADIC path_elems text[])
jsonb_extract_path_text(from_json jsonb, VARIADIC path_elems text[])
json_object_keys(json)
jsonb_object_keys(jsonb)
json_populate_record(base anyelement, from_json json)
jsonb_populate_record(base anyelement, from_json jsonb)
json_populate_recordset(base anyelement, from_json json)
jsonb_populate_recordset(base anyelement, from_json jsonb)
json_array_elements(json)
jsonb_array_elements(jsonb)
json_array_elements_text(json)
jsonb_array_elements_text(jsonb)
json_typeof(json)
jsonb_typeof(jsonb)
json_to_record(json)
jsonb_to_record(jsonb)
json_to_recordset(json)
jsonb_to_recordset(jsonb)
json_strip_nulls(from_json json)
jsonb_strip_nulls(from_json jsonb)
jsonb_set(target jsonb, path text[], new_value jsonb[, create_missing boolean])
jsonb_insert(target jsonb, path text[], new_value jsonb, [insert_after boolean])
jsonb_pretty(from_json jsonb)
I should probably focus on the ones that return
json
,jsonb
, andtext
first as they will be very simple. The ones that return more complex types (such assetof text
orrecord
) will be much more difficult, so I will do them later (or even not at all, if it proves to be too time consuming).The text was updated successfully, but these errors were encountered: