-
Notifications
You must be signed in to change notification settings - Fork 52
DOCSP-32718: updateone UE code comments #759
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-32718: updateone UE code comments #759
Conversation
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.
Requested some edits, but otherwise LGTM
@@ -1,34 +1,45 @@ | |||
/* Update a document */ |
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.
I think we agreed to just do // for single-line comments. Otherwise this isn't something that would hold up "approval"
@@ -1,34 +1,45 @@ | |||
/* Update a document */ | |||
|
|||
// Import the MongoClient type from the mongodb package. |
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.
Remove, I think.
import { MongoClient } from "mongodb"; | ||
|
||
// Replace the uri string with your MongoDB deployment's connection string. | ||
const uri = "<connection string uri>"; | ||
|
||
// Create a new client and connect to MongoDB. |
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.
Remove this comment too.
const database = client.db("sample_mflix"); | ||
const movies = database.collection("movies"); | ||
|
||
// create a filter for a movie to update | ||
// Create a filter for movies with the title "Random Harvest". |
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.
This looks awesome! Way more clear that the previous comment!
await client.close(); | ||
} | ||
} | ||
// Run the program and handle any errors that occur during execution. |
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.
I think we can drop this one too.
@@ -1,34 +1,48 @@ | |||
/* Update a document */ |
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.
You can apply the same comments as above.
* DOCSP-32718: updateone UE code comments * fixes
* DOCSP-32718: updateone UE code comments * fixes
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-32718
https://preview-mongodbrustagir.gatsbyjs.io/node/DOCSP-32718-updateone-comments/usage-examples/updateOne/