Skip to content

DOCSP-32718: Compound comments #771

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

Merged
merged 6 commits into from
Aug 31, 2023

Conversation

norareidy
Copy link
Collaborator

@norareidy norareidy commented Aug 30, 2023

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-32718
Staging - https://docs-mongodbcom-staging.corp.mongodb.com/node/docsworker-xlarge/DOCSP-32718-compound-comments/fundamentals/indexes/

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?

Copy link
Collaborator

@rustagir rustagir left a comment

Choose a reason for hiding this comment

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

non blocking comments

@@ -5,12 +5,16 @@ const { MongoClient } = require("mongodb");
const uri =
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";

// Create a new instance of the MongoClient using the provided URI
Copy link
Collaborator

Choose a reason for hiding this comment

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

S: Simplify

Suggested change
// Create a new instance of the MongoClient using the provided URI
// Create a new client and connect to MongoDB

const client = new MongoClient(uri);

// Define a function to interact with the MongoDB database
Copy link
Collaborator

Choose a reason for hiding this comment

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

S: delete this code comment, as it is not related to the mongodb operation (it is JS scaffolding)

const sort = { type: 1, genre: 1 };
// Include the type and genre fields in the query results
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
// Include the type and genre fields in the query results
// Include only the type and genre fields in the query results

await client.close();
}
}
// Call the "run" function and handle any errors using console.dir
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
// Call the "run" function and handle any errors using console.dir
// Run the function and handle any errors

@norareidy norareidy merged commit f751b1b into mongodb:master Aug 31, 2023
@norareidy norareidy deleted the DOCSP-32718-compound-comments branch August 31, 2023 19:00
norareidy added a commit that referenced this pull request Sep 12, 2023
* DOCSP-32718: insertOne comments

* DOCSP-32718: runCommand comments

* DOCSP-32718: compound comments

* Revert "DOCSP-32718: insertOne comments"

This reverts commit 6d1c8ac.

* Revert "DOCSP-32718: runCommand comments"

This reverts commit d7a2f49.

* addressing feedback

(cherry picked from commit f751b1b)
mongoKart pushed a commit to mongoKart/docs-node that referenced this pull request Nov 3, 2023
* DOCSP-32718: insertOne comments

* DOCSP-32718: runCommand comments

* DOCSP-32718: compound comments

* Revert "DOCSP-32718: insertOne comments"

This reverts commit 6d1c8ac.

* Revert "DOCSP-32718: runCommand comments"

This reverts commit d7a2f49.

* addressing feedback
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.

2 participants