Skip to content

Add return=minimal option, Fix content-type bug #19

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

Merged
merged 6 commits into from
Dec 4, 2021

Conversation

thecoolwinter
Copy link
Contributor

It looks like there's a lot of commits to this PR but only ~2 of them are new.

What does this PR Change

  • Fixed a content-type bug and added a content-type=application/json header when necessary to PostgrestBuilder.
  • Adds a returns=minimal option suggested in Provide parameter „returning:minimal“ for Swift #18 to optionally not return any option when inserting, updating, or deleting data.
    • Creates a new enum PostgrestReturningOptions for how to specify this option.

@grdsdev
Copy link
Contributor

grdsdev commented Dec 2, 2021

LGTM.

Thanks for the contribution. Can you rebase this PR for getting rid of the other commits? I can merge it after that.

author Khan Winter <[email protected]> 1627658421 -0500
committer Khan Winter <[email protected]> 1638459904 -0600

Fixed RPC builder, removed testing framework

Fixed a bug with the RPC builder setting the query builder's method to the RPC's schema.

Added a test for RPC functions.

Removed unnecessary testing framework.

Updated README.md

Add Test for RPC function call

Fix RPC builder bug

RPC builder was passing `schema` to the `method` property.

Rename `form` to `from`

Update PostgrestBuilder.swift

Make body content-type explicit

Make body content-type explicit

Actually make content-type explicit for JSON httpbody

Update PostgrestFilterBuilder.swift

Add return= option

Adds an enum `PostgrestReturningOptions` that specifies either a `minimal` or `representation` return from the PostgREST query.

This option is added to `insert`, `update`, and `delete`. In relation to issue supabase-community#18
@thecoolwinter
Copy link
Contributor Author

Should be ready to merge now!

@grdsdev grdsdev merged commit bd7dcf8 into supabase-community:master Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants