-
Notifications
You must be signed in to change notification settings - Fork 13
(DOCSP-43745) Connect to MongoDB #61
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-43745) Connect to MongoDB #61
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.
LGTM with a few nits/questions!
fprintf (stderr, "%s\n", error.message); | ||
goto cleanup; |
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.
Q: Should these have the same indentation?
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.
yup fixed it!
source/connect.txt
Outdated
mongoc_client_t *client = mongoc_client_new (uri); |
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.
Nit: we use underlines for the placeholders elsewhere in this page, I think we should stick to that.
char *uri = "mongodb://<replica-set-member>:<port>/?replicaSet=<replica-set-name>"; | |
mongoc_client_t *client = mongoc_client_new (uri); | |
char *uri = "mongodb://<replica_set_member>:<port>/?replicaSet=<replica_set_name>"; | |
mongoc_client_t *client = mongoc_client_new (uri); |
source/connect.txt
Outdated
.. code-block:: c | ||
|
||
mongoc_client_t *client = mongoc_client_new("mongodb://<db_username>:<db_password>@<hostname>:<port>/?server_selector=<selector-function>"); |
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.
Same nit as above
mongoc_client_t *client = mongoc_client_new("mongodb://<db_username>:<db_password>@<hostname>:<port>/?server_selector=<selector-function>"); | |
mongoc_client_t *client = mongoc_client_new("mongodb://<db_username>:<db_password>@<hostname>:<port>/?server_selector=<selector_function>"); |
1e052b3
to
04f50c6
Compare
@kevinAlbs thanks so much for all your help and thoroughness on these C standardization PRs! |
source/connect.txt
Outdated
client = mongoc_client_new_from_uri (uri); |
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.
uri = mongoc_uri_new ("mongodb://localhost:27017"); | |
client = mongoc_client_new_from_uri (uri); | |
client = mongoc_client_new ("mongodb://localhost:27017"); |
Suggest not using uri
for consistency with tabbed examples.
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.
Not yet addressed.
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 one comment addressed.
source/connect.txt
Outdated
client = mongoc_client_new_from_uri (uri); |
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.
Not yet addressed.
Pull Request Info
Fill out root page for "Connect to MongoDB" (created as stub in this ticket).
A/C: I can see all the operations for connecting to MongoDB in a section.
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-43745
Staging - https://deploy-preview-61--docs-c.netlify.app/connect/
Self-Review Checklist