Skip to content

Commit

Permalink
DOCSP-39726: Usage Example that describe query (#114)
Browse files Browse the repository at this point in the history
# Pull Request Info

[PR Reviewing
Guidelines](https://github.com/mongodb/docs-java/blob/master/REVIEWING.md)

[JIRA ](https://jira.mongodb.org/browse/DOCSP-30726#r1226735778)

Staging -
[UpdateMany](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-39726-Usage-Example-describe-query/usage-examples/updateMany/)
page,
[updateOne](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-39726-Usage-Example-describe-query/usage-examples/updateOne/)
page

## Self-Review Checklist

- [x] Is this free of any warnings or errors in the RST?
- [x] Did you run a spell-check?
- [x] Did you run a grammar-check?
- [x] Are all the links working?

(cherry picked from commit 7c36250)
  • Loading branch information
nickldp authored and rustagir committed Jul 14, 2023
1 parent 196631e commit ea867ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions source/usage-examples/updateMany.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ bottom of this page.
Example
-------

In this example, we update documents that match our query in the ``movies``
collection of the ``sample_mflix`` database. We perform the following
In this example, we use a ``Filter`` builder to filter our query for
movies in the genre "Frequently Discussed".

Next, we update documents that match our query in the ``movies`` collection of the
``sample_mflix`` database. We perform the following
updates to the matching documents:

- Add ``Frequently Discussed`` to the array of ``genres`` only if it does not
Expand Down
5 changes: 4 additions & 1 deletion source/usage-examples/updateOne.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ bottom of this page.
Example
-------

In this example, we perform the following updates to the first match for our query
In this example, we use a ``Filter`` builder to query the collection for
a movie with the title "Cool Runnings 2".

Next, we perform the following updates to the first match for our query
in the ``movies`` collection of the ``sample_mflix`` database:

#. Set the value of ``runtime`` to ``99``
Expand Down

0 comments on commit ea867ab

Please sign in to comment.