-
Notifications
You must be signed in to change notification settings - Fork 12
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
DOCSP-43088: Aggregations #38
Conversation
✅ Deploy Preview for docs-c ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this 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
source/aggregation.txt
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this 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); | ||
} |
There was a problem hiding this comment.
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);
}
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