Skip to content

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

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

rustagir
Copy link
Collaborator

Copy link
Collaborator

@caitlindavey caitlindavey left a 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 */
Copy link
Collaborator

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.
Copy link
Collaborator

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.
Copy link
Collaborator

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".
Copy link
Collaborator

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.
Copy link
Collaborator

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 */
Copy link
Collaborator

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.

@rustagir rustagir merged commit 89f96cf into mongodb:master Sep 1, 2023
rustagir added a commit that referenced this pull request Sep 7, 2023
* DOCSP-32718: updateone UE code comments

* fixes
mongoKart pushed a commit to mongoKart/docs-node that referenced this pull request Nov 3, 2023
* DOCSP-32718: updateone UE code comments

* fixes
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