Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ee0244a

Browse files
committed
More links
1 parent d83a70c commit ee0244a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

‎create.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ main().catch(console.error);
6868
* @param {Object} newListing The new listing to be added
6969
*/
7070
async function createListing(client, newListing){
71-
// See https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#insertOnee for the insertOne() docs
71+
// See https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#insertOne for the insertOne() docs
7272
const result = await client.db("sample_airbnb").collection("listingsAndReviews").insertOne(newListing);
7373
console.log(`New listing created with the following id: ${result.insertedId}`);
7474
}

‎delete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function deleteListingByName(client, nameOfListing) {
6565
* @param {Date} date The date to check the last_scraped property against
6666
*/
6767
async function deleteListingsScrapedBeforeDate(client, date) {
68-
// See https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#deleteMany for the deleteMany() docs
68+
// See https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#deleteMany for the deleteMany() docs
6969
const result = await client.db("sample_airbnb").collection("listingsAndReviews").deleteMany({ "last_scraped": { $lt: date } });
7070
console.log(`${result.deletedCount} document(s) was/were deleted.`);
7171
}

‎update.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async function upsertListingByName(client, nameOfListing, updatedListing) {
9696
* @param {MongoClient} client A MongoClient that is connected to a cluster with the sample_airbnb database
9797
*/
9898
async function updateAllListingsToHavePropertyType(client) {
99-
// See https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#updateMany for the updateMany() docs
99+
// See https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#updateMany for the updateMany() docs
100100
const result = await client.db("sample_airbnb").collection("listingsAndReviews").updateMany({ property_type: { $exists: false } }, { $set: { property_type: "Unknown" } });
101101
console.log(`${result.matchedCount} document(s) matched the query criteria.`);
102102
console.log(`${result.modifiedCount} document(s) was/were updated.`);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /