Skip to content

Commit 281720f

Browse files
author
Chris Cho
authored
DOCSP-13901: use writeConcern instead of w (#131)
1 parent 1291d56 commit 281720f

31 files changed

+31
-31
lines changed

source/code-snippets/connection/srv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { MongoClient } = require("mongodb");
22

33
// Connection URI
44
const uri =
5-
"mongodb+srv://sample-hostname:27017/?poolSize=20&w=majority";
5+
"mongodb+srv://sample-hostname:27017/?poolSize=20&writeConcern=majority";
66

77
// Create a new MongoClient
88
const client = new MongoClient(uri);

source/code-snippets/crud/arrayFilters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const stream = require("stream");
33

44
// Replace the following string with your MongoDB deployment's connection string.
55
const uri =
6-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
6+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
77
const client = new MongoClient(uri);
88

99

source/code-snippets/crud/cursor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const stream = require("stream");
33

44
// Replace the following string with your MongoDB deployment's connection string.
55
const uri =
6-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
6+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
77
const client = new MongoClient(uri);
88

99
async function forEachIteration(collection) {

source/code-snippets/crud/pizza.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { MongoClient } = require("mongodb");
22

33
// Replace the following string with your MongoDB deployment's connection string.
44
const uri =
5-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
5+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
66
const client = new MongoClient(uri);
77

88
function sleep(ms) {

source/code-snippets/crud/startrek.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { MongoClient } = require("mongodb");
22

33
// Replace the following string with your MongoDB deployment's connection string.
44
const uri =
5-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
5+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
66
const client = new MongoClient(uri);
77

88
async function word(movies) {

source/code-snippets/crud/theaters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { MongoClient } = require("mongodb");
22

33
// Replace the following string with your MongoDB deployment's connection string.
44
const uri =
5-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
5+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
66
const client = new MongoClient(uri);
77

88
async function proximity(theaters) {

source/code-snippets/indexes/compound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { MongoClient } = require("mongodb");
33
// Replace the following with your MongoDB deployment's connection
44
// string.
55
const uri =
6-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
6+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
77

88
const client = new MongoClient(uri);
99

source/code-snippets/indexes/geo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { MongoClient } = require("mongodb");
33
// Replace the following with your MongoDB deployment's connection
44
// string.
55
const uri =
6-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
6+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
77

88
const client = new MongoClient(uri);
99

source/code-snippets/indexes/multikey.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { MongoClient } = require("mongodb");
33
// Replace the following with your MongoDB deployment's connection
44
// string.
55
const uri =
6-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
6+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
77

88
const client = new MongoClient(uri);
99

source/code-snippets/indexes/single-field.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { MongoClient } = require("mongodb");
33
// Replace the following with your MongoDB deployment's connection
44
// string.
55
const uri =
6-
"mongodb+srv://<user>:<password>@<cluster-url>?w=majority";
6+
"mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
77

88
const client = new MongoClient(uri);
99

0 commit comments

Comments
 (0)