Skip to content

Commit ce0fa18

Browse files
author
Chris Cho
authored
Fix code block indentation (#457)
1 parent f9d6353 commit ce0fa18

File tree

4 files changed

+56
-56
lines changed

4 files changed

+56
-56
lines changed

source/fundamentals/collations.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ following documents:
193193

194194
.. code-block:: none
195195

196-
{ "_id" : 1, "first_name" : "Hans" }
197-
{ "_id" : 2, "first_name" : "Gunter" }
198-
{ "_id" : 3, "first_name" : "Günter" }
199-
{ "_id" : 4, "first_name" : "Jürgen" }
196+
{ "_id" : 1, "first_name" : "Hans" }
197+
{ "_id" : 2, "first_name" : "Gunter" }
198+
{ "_id" : 3, "first_name" : "Günter" }
199+
{ "_id" : 4, "first_name" : "Jürgen" }
200200

201201
Consider the following ``findOneAndUpdate()`` operation on this collection
202202
which **does not** specify a collation:
@@ -229,9 +229,9 @@ the operation returns the following updated document:
229229

230230
.. code-block:: none
231231

232-
{ lastErrorObject: { updatedExisting: true, n: 1 },
233-
value: { _id: 3, first_name: 'Günter' },
234-
ok: 1 }
232+
{ lastErrorObject: { updatedExisting: true, n: 1 },
233+
value: { _id: 3, first_name: 'Günter' },
234+
ok: 1 }
235235

236236
findOneAndDelete() Example
237237
``````````````````````````
@@ -242,9 +242,9 @@ documents:
242242

243243
.. code-block:: none
244244

245-
{ "_id" : 1, "a" : "16" }
246-
{ "_id" : 2, "a" : "84" }
247-
{ "_id" : 3, "a" : "179" }
245+
{ "_id" : 1, "a" : "16" }
246+
{ "_id" : 2, "a" : "84" }
247+
{ "_id" : 3, "a" : "179" }
248248

249249
In this example, we set the ``numericOrdering`` collation parameter to ``true``
250250
to sort numeric strings based on their numerical order instead of their
@@ -260,8 +260,8 @@ documents:
260260

261261
.. code-block:: none
262262

263-
{ "_id" : 1, "a" : "16" }
264-
{ "_id" : 2, "a" : "84" }
263+
{ "_id" : 1, "a" : "16" }
264+
{ "_id" : 2, "a" : "84" }
265265

266266
If you perform the same operation without collation on the original
267267
collection of three documents, it matches documents based on the lexical value
@@ -280,8 +280,8 @@ contains the following documents:
280280

281281
.. code-block:: none
282282

283-
{ "_id" : 2, "a" : "84" }
284-
{ "_id" : 3, "a" : "179" }
283+
{ "_id" : 2, "a" : "84" }
284+
{ "_id" : 3, "a" : "179" }
285285

286286
Aggregation Example
287287
```````````````````

source/fundamentals/crud/query-document.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,19 +148,19 @@ This code snippet returns the following results:
148148

149149
.. code-block:: javascript
150150

151-
collection.find({
152-
rating: { $eq: 5 },
153-
qty: { $gt: 4 }
154-
})
151+
collection.find({
152+
rating: { $eq: 5 },
153+
qty: { $gt: 4 }
154+
})
155155

156156
.. code-block:: javascript
157157

158-
collection.find({
159-
$and: [
160-
{ rating: { $eq: 5 }},
161-
{ qty: { $gt: 4 }}
162-
]
163-
})
158+
collection.find({
159+
$and: [
160+
{ rating: { $eq: 5 }},
161+
{ qty: { $gt: 4 }}
162+
]
163+
})
164164

165165
For more information on comparison operators, see the reference manual
166166
entry for :manual:`Comparison Query Operators </reference/operator/query-comparison/>`.

source/fundamentals/logging.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ Logging
1515
The driver doesn't use the logger in versions 4.0 and later.
1616
Attempting to use prior logger settings in this version won't print
1717
anything in the log.
18-
18+
1919
Instead, see our monitoring guides:
2020

21-
- :doc:`Command Monitoring </fundamentals/monitoring/command-monitoring>`
21+
- :doc:`Command Monitoring </fundamentals/monitoring/command-monitoring>`
2222
- :doc:`Cluster Monitoring </fundamentals/monitoring/cluster-monitoring>`
2323

2424
Temporary Alternative
@@ -29,9 +29,9 @@ meantime, you can output monitor events using the following snippet:
2929

3030
.. code-block:: javascript
3131

32-
const uri = "mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
33-
const client = new MongoClient(uri, { monitorCommands:true });
34-
35-
client.on('commandStarted', (event) => console.debug(event));
36-
client.on('commandSucceeded', (event) => console.debug(event));
37-
client.on('commandFailed', (event) => console.debug(event));
32+
const uri = "mongodb+srv://<user>:<password>@<cluster-url>?writeConcern=majority";
33+
const client = new MongoClient(uri, { monitorCommands:true });
34+
35+
client.on('commandStarted', (event) => console.debug(event));
36+
client.on('commandSucceeded', (event) => console.debug(event));
37+
client.on('commandFailed', (event) => console.debug(event));

source/quick-start.txt

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -137,30 +137,30 @@ Connect to Your Application
137137

138138
.. code-block:: js
139139

140-
const { MongoClient } = require("mongodb");
141-
142-
// Replace the uri string with your connection string.
143-
const uri =
144-
"mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&w=majority";
145-
146-
const client = new MongoClient(uri);
147-
148-
async function run() {
149-
try {
150-
const database = client.db('sample_mflix');
151-
const movies = database.collection('movies');
152-
153-
// Query for a movie that has the title 'Back to the Future'
154-
const query = { title: 'Back to the Future' };
155-
const movie = await movies.findOne(query);
156-
157-
console.log(movie);
158-
} finally {
159-
// Ensures that the client will close when you finish/error
160-
await client.close();
161-
}
162-
}
163-
run().catch(console.dir);
140+
const { MongoClient } = require("mongodb");
141+
142+
// Replace the uri string with your connection string.
143+
const uri =
144+
"mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&w=majority";
145+
146+
const client = new MongoClient(uri);
147+
148+
async function run() {
149+
try {
150+
const database = client.db('sample_mflix');
151+
const movies = database.collection('movies');
152+
153+
// Query for a movie that has the title 'Back to the Future'
154+
const query = { title: 'Back to the Future' };
155+
const movie = await movies.findOne(query);
156+
157+
console.log(movie);
158+
} finally {
159+
// Ensures that the client will close when you finish/error
160+
await client.close();
161+
}
162+
}
163+
run().catch(console.dir);
164164

165165
.. tip::
166166

0 commit comments

Comments
 (0)