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

Adding head and count option on select(), insert(), update(), delete(), and rpc() #147

Merged
merged 12 commits into from Jan 15, 2021
Merged

Conversation

dshukertjr
Copy link
Member

What kind of change does this PR introduce?

It will add head and count option to allow querying row count.

What is the current behavior?

Cannot get row count.

What is the new behavior?

Enable retrieving row count.

Related issues

#94

@dshukertjr
Copy link
Member Author

I have implemented count option for select, and wanted some feedback so that what I am doing here is along the line of what discussed here.

@dshukertjr
Copy link
Member Author

@steve-chavez @kiwicopple @soedirgo
I am done implementing the count and head option on select, and added count field to the test snapshot at this point. If everything looks fine, I would move on to implementing count and head to insert(), update(), delete(), and rpc().

Copy link
Member

@soedirgo soedirgo left a comment

Choose a reason for hiding this comment

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

Nice work @dshukertjr, just one nit :)

Also, if you could add a simple test case in basic.ts that would be great!

src/lib/PostgrestQueryBuilder.ts Outdated Show resolved Hide resolved
src/lib/types.ts Show resolved Hide resolved
Co-authored-by: Bobbie Soedirgo <bobbie@soedirgo.dev>
@dshukertjr
Copy link
Member Author

I will work on adding the test cases now.

@dshukertjr
Copy link
Member Author

I do have one concern about the result of count: estimate and count: planned. Other than that, I think this pull request is pretty close to be ready to be merged. Any comments, feedback is greatly welcome!

@soedirgo
Copy link
Member

Awesome work @dshukertjr, love the extensive tests :)

Will merge this if it looks good @kiwicopple

@dshukertjr dshukertjr changed the title [WIP] Adding head and count option on select(), insert(), update(), delete(), and rpc() Adding head and count option on select(), insert(), update(), delete(), and rpc() Jan 14, 2021
@dshukertjr
Copy link
Member Author

Since the last concern that I had with this PR is solved thanks to @kiwicopple , I think this PR is ready to be merged.

@soedirgo soedirgo merged commit 8cf6e00 into supabase:master Jan 15, 2021
@github-actions
Copy link

🎉 This PR is included in version 0.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants