Skip to content

Commit 8c04b7e

Browse files
jmikolaajdavis
authored andcommitted
Document reply for update_one and update_many
1 parent 7fbade4 commit 8c04b7e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/libmongoc/doc/mongoc_collection_update_many.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ This function updates all documents in ``collection`` that match ``selector``.
3636

3737
To update at most one document see :symbol:`mongoc_collection_update_one`.
3838

39+
If you pass a non-NULL ``reply``, it is filled out with fields ``matchedCount``, ``modifiedCount``, and optionally ``upsertedId`` if applicable. If there is a server error then ``reply`` contains either a "writeErrors" array with one subdocument or a "writeConcernErrors" array. The reply must be freed with :symbol:`bson:bson_destroy`.
40+
3941
See Also
4042
--------
4143

@@ -54,5 +56,3 @@ Returns
5456
Returns ``true`` if successful. Returns ``false`` and sets ``error`` if there are invalid arguments or a server or network error.
5557

5658
A write concern timeout or write concern error is considered a failure.
57-
58-
If provided, ``reply`` will be initialized and populated with the fields ``matchedCount``, ``modifiedCount``, and optionally ``upsertedId`` if applicable. The reply must be freed with :symbol:`bson:bson_destroy`.

src/libmongoc/doc/mongoc_collection_update_one.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ This function updates at most one document in ``collection`` that matches ``sele
3636

3737
To update multiple documents see :symbol:`mongoc_collection_update_many`.
3838

39+
If you pass a non-NULL ``reply``, it is filled out with fields ``matchedCount``, ``modifiedCount``, and optionally ``upsertedId`` if applicable. If there is a server error then ``reply`` contains either a "writeErrors" array with one subdocument or a "writeConcernErrors" array. The reply must be freed with :symbol:`bson:bson_destroy`.
40+
3941
See Also
4042
--------
4143

@@ -57,8 +59,6 @@ Returns ``true`` if successful. Returns ``false`` and sets ``error`` if there ar
5759

5860
A write concern timeout or write concern error is considered a failure.
5961

60-
If provided, ``reply`` will be initialized and populated with the fields ``matchedCount``, ``modifiedCount``, and optionally ``upsertedId`` if applicable. The reply must be freed with :symbol:`bson:bson_destroy`.
61-
6262
Example
6363
-------
6464
.. literalinclude:: ../examples/example-update.c

0 commit comments

Comments
 (0)