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): adds COUNT aggregation query #6692

Merged
merged 13 commits into from Oct 7, 2022
Merged

Conversation

telpirion
Copy link
Contributor

This PR implements the StructuredAggregationQuery feature for Firestore.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: firestore Issues related to the Firestore API. labels Sep 18, 2022
@snippet-bot
Copy link

snippet-bot bot commented Sep 19, 2022

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@telpirion telpirion marked this pull request as ready for review September 21, 2022 16:56
@telpirion telpirion requested review from enocom and a team as code owners September 21, 2022 16:56
firestore/mock_test.go Outdated Show resolved Hide resolved
firestore/query.go Outdated Show resolved Hide resolved
firestore/query.go Outdated Show resolved Hide resolved
firestore/query.go Show resolved Hide resolved
for _, res := range responses {
switch res := res.(type) {
case *pb.RunAggregationQueryResponse:
if err := qs.Send(res); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

return qs.Send(res)

With a return in each branch, you can also remove the return nil outside of the statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Compiler doesn't like it when I remove the return statement, even when I add a return nil after the if in the first branch.

@enocom enocom self-assigned this Sep 29, 2022
@telpirion telpirion enabled auto-merge (squash) October 7, 2022 17:32
@telpirion telpirion added the automerge Merge the pull request once unit tests and other checks pass. label Oct 7, 2022
@telpirion telpirion merged commit 31ac692 into main Oct 7, 2022
@telpirion telpirion deleted the firestore-count branch October 7, 2022 17:41
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants