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

feat(firestore): support for aggregate queries including sum() & average() #8115

Merged
merged 28 commits into from
Nov 14, 2024

Conversation

russellwheatley
Copy link
Member

@russellwheatley russellwheatley commented Nov 5, 2024

Description

Related issues

closes #8027

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Nov 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 13, 2024 0:37am

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

exciting! couldn't but look through it even though draft+android-only+no-e2e at the moment because I contemplated implementing this myself months ago :-)

Had a couple quick thoughts but mostly just wanted to say this is exciting. Cheers

@russellwheatley russellwheatley changed the title feat(firestore): support for aggregate queries including sum() & average() feat(firestore): support for aggregate queries including sum() & average() Nov 6, 2024
having native module exceptions vs promise rejects requires JS level
code to handle multiple types of error vs being able to use one style
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

  • has one code error from just reading in iOS, noted with suggestion to add return after executing reject block
  • the number handling probe hit paydirt! which is kind of awful but also represents progress (known error better than unknown error...)
  • some new android issue ?

It really does look like progress tho, just this one is a real feature size-wise so has real subtleties

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

awesome!

@russellwheatley russellwheatley enabled auto-merge (squash) November 12, 2024 16:25
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

still LGTM - just looked at the last couple test additions (nice)

@mikehardy mikehardy merged commit e4c57fa into main Nov 14, 2024
17 of 19 checks passed
@mikehardy mikehardy deleted the firestore-getAggregateFromServer branch November 14, 2024 15:10
@alanschwarz
Copy link

alanschwarz commented Nov 18, 2024

Hi!

I upgraded to 21.5.0 today because I was super happy for the support for sum(). But I think there might be an issue with typescript... I made some screenshots. Maybe I am doing something wrong, but the docs aren't updated yet, so I'm not sure how to help...

Screenshot from 2024-11-18 22-46-24

Thank you! If I can help in any way please let me know :)

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.

🐛 @react-native-firebase/firestore Need Sum in aggregation method
4 participants