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

Added count to ModeledResponse #103

Merged
merged 5 commits into from
Feb 3, 2025

Conversation

DanielW093
Copy link
Contributor

@DanielW093 DanielW093 commented Jan 25, 2025

What kind of change does this PR introduce?

Added count to ModeledResponse, with ability to specify what kind of count should be retrieved

@grdsdev
Copy link
Collaborator

grdsdev commented Jan 30, 2025

Hey @DanielW093, thanks for adding that! Can you add a test case for that change?

@DanielW093
Copy link
Contributor Author

Hey @DanielW093, thanks for adding that! Can you add a test case for that change?

Of course, happy to :)

@grdsdev
Copy link
Collaborator

grdsdev commented Jan 30, 2025

@DanielW093, I’ve been thinking, instead of adding a new method, why don’t we just add a count property to the ModeledResponse? That way, it’ll be more in line with postgrest-js, as shown in: https://github.com/supabase/postgrest-js/blob/master/src/types.ts#L17

@DanielW093
Copy link
Contributor Author

@DanielW093, I’ve been thinking, instead of adding a new method, why don’t we just add a count property to the ModeledResponse? That way, it’ll be more in line with postgrest-js, as shown in: https://github.com/supabase/postgrest-js/blob/master/src/types.ts#L17

If you think that makes more sense then I'll defer to your judgement! I'll admit I didn't dig too deeply into the codebase before making this change, so if that's better and more consistent with other libraries then that's probably the right approach

@grdsdev
Copy link
Collaborator

grdsdev commented Jan 30, 2025

Sure, so let's go with the count property then

@DanielW093 DanielW093 changed the title Added GetWithCount method Added count to ModeledResponse Feb 1, 2025
@DanielW093
Copy link
Contributor Author

@grdsdev I've implemented my version of the suggested change and added tests, it all appears to be working as expected in my project

@grdsdev grdsdev force-pushed the feature/getwithcount branch from d09f7be to f56a2bc Compare February 3, 2025 13:30
@grdsdev
Copy link
Collaborator

grdsdev commented Feb 3, 2025

Thanks @DanielW093

@grdsdev grdsdev merged commit e708b36 into supabase-community:master Feb 3, 2025
1 check passed
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