@@ -540,11 +540,11 @@ following form:
540540
541541.. code-block:: javascript
542542
543- db.people.findAndModify( {
544- query: { name: "Tom", state: "active", rating: { $gt: 10 } },
545- sort: { rating: 1 },
546- update: { $inc: { score: 1 } }
547- } );
543+ db.people.findAndModify( {
544+ query: { name: "Tom", state: "active", rating: { $gt: 10 } },
545+ sort: { rating: 1 },
546+ update: { $inc: { score: 1 } }
547+ } );
548548
549549However, the :method:`~db.collection.findAndModify()` shell helper
550550method returns only the unmodified document, or if ``new`` is
@@ -569,15 +569,15 @@ document or, if no matching document exists, create a new document:
569569
570570.. code-block:: javascript
571571
572- db.runCommand(
573- {
574- findAndModify: "people",
575- query: { name: "Gus", state: "active", rating: 100 },
576- sort: { rating: 1 },
577- update: { $inc: { score: 1 } },
578- upsert: true
579- }
580- )
572+ db.runCommand(
573+ {
574+ findAndModify: "people",
575+ query: { name: "Gus", state: "active", rating: 100 },
576+ sort: { rating: 1 },
577+ update: { $inc: { score: 1 } },
578+ upsert: true
579+ }
580+ )
581581
582582If the command finds a matching document, the command performs an update.
583583
0 commit comments