Skip to content
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

Update functions.rst #3703

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Update functions.rst #3703

merged 1 commit into from
Aug 23, 2024

Conversation

jasonmclose
Copy link
Contributor

This change adds an explanation of how to handle an array of JSON objects within an RPC call. To pass multiple objects, an array of JSON objects must be the JSON value, with the key being the json or jsonb variable name of the Postgres function.

For people who want to perform multiple tasks/inserts/updates within a single API call, this is a needed explanation for that use-case.

I recently had this problem, and after solving it on my own, I realized that I would have been saved several hours of troubleshooting had this simple example been included in the API documentation.

This change adds an explanation of how to handle an array of JSON objects within an RPC call.  To pass multiple objects, an array of JSON objects must be the JSON value, with the key being the json or jsonb variable name of the Postgres function.

For people who want to perform multiple tasks/inserts/updates within a single API call, this is a needed explanation for that use-case.

I recently had this problem, and after solving it on my own, I realized that I would have been saved several hours of troubleshooting had this simple example been included in the API documentation.
Copy link
Member

@steve-chavez steve-chavez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very useful. Many thanks for the contribution!

@steve-chavez steve-chavez merged commit 1fff248 into PostgREST:v12 Aug 23, 2024
5 checks passed
@steve-chavez
Copy link
Member

Cherry-picked this into the main branch f21053d

@jasonmclose jasonmclose deleted the patch-1 branch August 23, 2024 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants