@@ -460,11 +460,11 @@ following form:
460460
461461.. code-block:: javascript
462462
463- db.people.findAndModify( {
464- query: { name: "Tom", state: "active", rating: { $gt: 10 } },
465- sort: { rating: 1 },
466- update: { $inc: { score: 1 } }
467- } );
463+ db.people.findAndModify( {
464+ query: { name: "Tom", state: "active", rating: { $gt: 10 } },
465+ sort: { rating: 1 },
466+ update: { $inc: { score: 1 } }
467+ } );
468468
469469However, the :method:`~db.collection.findAndModify()` shell helper
470470method returns only the unmodified document, or if ``new`` is
@@ -489,15 +489,15 @@ document or, if no matching document exists, create a new document:
489489
490490.. code-block:: javascript
491491
492- db.runCommand(
493- {
494- findAndModify: "people",
495- query: { name: "Gus", state: "active", rating: 100 },
496- sort: { rating: 1 },
497- update: { $inc: { score: 1 } },
498- upsert: true
499- }
500- )
492+ db.runCommand(
493+ {
494+ findAndModify: "people",
495+ query: { name: "Gus", state: "active", rating: 100 },
496+ sort: { rating: 1 },
497+ update: { $inc: { score: 1 } },
498+ upsert: true
499+ }
500+ )
501501
502502If the command finds a matching document, the command performs an update.
503503
0 commit comments