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-39791: Databases & collections #87

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

norareidy
Copy link
Collaborator

@norareidy norareidy commented Dec 3, 2024

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

  • 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 Dec 3, 2024

Deploy Preview for docs-cpp ready!

Name Link
🔨 Latest commit 4224acc
🔍 Latest deploy log https://app.netlify.com/sites/docs-cpp/deploys/67531f86cb6af2000847778b
😎 Deploy Preview https://deploy-preview-87--docs-cpp.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.

Copy link
Collaborator

@mcmorisi mcmorisi left a comment

Choose a reason for hiding this comment

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

LGTM, nice work!

Comment on lines 50 to 51
Alternatively, you can use the ``[]`` operator as a shorthand for the
``database()`` function, as shown in the following code:
Copy link
Collaborator

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.

Comment on lines 76 to 77
Alternatively, you can use the ``[]`` operator as a shorthand for the
``collection()`` function, as shown in the following code:
Copy link
Collaborator

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.

@norareidy norareidy requested a review from kevinAlbs December 5, 2024 18:35
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 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)
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
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)
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
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)
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
rc.acknowledge_level(mongocxx::read_concern::level::k_local)
rc.acknowledge_level(mongocxx::read_concern::level::k_local);

@norareidy norareidy merged commit 00f5a9a into mongodb:master Dec 6, 2024
4 of 5 checks passed
@norareidy norareidy deleted the DOCSP-39791-db-colls branch December 6, 2024 16:07
norareidy added a commit that referenced this pull request Dec 6, 2024
* DOCSP-39791: Databases & collections

* code edits

* wording

* MM feeback

* KA feedback

(cherry picked from commit 00f5a9a)
norareidy added a commit that referenced this pull request Dec 6, 2024
* DOCSP-39791: Databases & collections

* code edits

* wording

* MM feeback

* KA feedback

(cherry picked from commit 00f5a9a)
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