-
Notifications
You must be signed in to change notification settings - Fork 14
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-39791: Databases & collections #87
Conversation
✅ Deploy Preview for docs-cpp 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, nice work!
source/databases-collections.txt
Outdated
Alternatively, you can use the ``[]`` operator as a shorthand for the | ||
``database()`` function, as shown in the following code: |
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.
S: It might be helpful to specify that you need to use the []
operator on a mongocxx::client
object.
source/databases-collections.txt
Outdated
Alternatively, you can use the ``[]`` operator as a shorthand for the | ||
``collection()`` function, as shown in the following code: |
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 comment as above, but with a mongocxx::database
object this time.
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 semicolons added.
mongocxx::read_preference rp; | ||
rp.mode(mongocxx::read_preference::read_mode::k_secondary); | ||
mongocxx::read_concern rc; | ||
rc.acknowledge_level(mongocxx::read_concern::level::k_majority) |
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.
rc.acknowledge_level(mongocxx::read_concern::level::k_majority) | |
rc.acknowledge_level(mongocxx::read_concern::level::k_majority); |
mongocxx::read_concern rc; | ||
rc.acknowledge_level(mongocxx::read_concern::level::k_local) | ||
mongocxx::write_concern wc; | ||
wc.acknowledge_level(mongocxx::write_concern::level::k_acknowledged) |
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.
wc.acknowledge_level(mongocxx::write_concern::level::k_acknowledged) | |
wc.acknowledge_level(mongocxx::write_concern::level::k_acknowledged); |
auto coll = client["test_database"]["test_collection"]; | ||
|
||
mongocxx::read_concern rc; | ||
rc.acknowledge_level(mongocxx::read_concern::level::k_local) |
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.
rc.acknowledge_level(mongocxx::read_concern::level::k_local) | |
rc.acknowledge_level(mongocxx::read_concern::level::k_local); |
* DOCSP-39791: Databases & collections * code edits * wording * MM feeback * KA feedback (cherry picked from commit 00f5a9a)
* DOCSP-39791: Databases & collections * code edits * wording * MM feeback * KA feedback (cherry picked from commit 00f5a9a)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-39791
Staging - https://deploy-preview-87--docs-cpp.netlify.app/databases-collections/
Self-Review Checklist