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

DOCSP-43088: Aggregations #38

Merged
merged 6 commits into from
Sep 18, 2024

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented Sep 18, 2024

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-43088
Staging - https://deploy-preview-38--docs-c.netlify.app/aggregation/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Sep 18, 2024

Deploy Preview for docs-c ready!

Name Link
🔨 Latest commit 9770111
🔍 Latest deploy log https://app.netlify.com/sites/docs-c/deploys/66eb311354c6a10008ba10b6
😎 Deploy Preview https://deploy-preview-38--docs-c.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mcmorisi mcmorisi marked this pull request as ready for review September 18, 2024 14:56
Copy link
Collaborator

@jordan-smith721 jordan-smith721 left a comment

Choose a reason for hiding this comment

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

LGMT w/ one fix

that represents the pipeline stages to the ``mongoc_collection_aggregate()`` function.

This example outputs a count of the number of bakeries in each borough
of New York City. The following code creates aggregation pipeline that contains the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
of New York City. The following code creates aggregation pipeline that contains the
of New York City. The following code creates an aggregation pipeline that contains the

@mcmorisi mcmorisi requested a review from kevinAlbs September 18, 2024 15:52
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM with possible error check.

char *str = bson_as_canonical_extended_json (doc, NULL);
printf ("%s\n", str);
bson_free (str);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

If error handling is relevant to the example (as it is below) suggest adding:

bson_error_t error;
if (mongoc_cursor_error(results, &error))
{
    fprintf(stderr, "Aggregate failed: %s\n", error.message);
}

@mcmorisi mcmorisi merged commit 46bb6d5 into mongodb:standardization Sep 18, 2024
1 check passed
@mcmorisi mcmorisi deleted the DOCSP-43088-aggregations branch September 18, 2024 19:59
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.

3 participants