[CDRIVER-2704] Add "upsertedCount" to CRUD function replies Created: 17/Jun/18  Updated: 28/Oct/23  Resolved: 20/Jun/18

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: None
Fix Version/s: 1.11.0

Type: New Feature Priority: Minor - P4
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

We are gradually approaching conformity with the CRUD Spec. We'll never fully implement it (it's designed for object-oriented programming languages, not for C), but we can support upsertedCount along with the other result fields from write operations.



 Comments   
Comment by Githook User [ 20/Jun/18 ]

Author:

{'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2704 update NEWS
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/35c15e566d974397e05b9f82833b901f3fe5b57a

Comment by Githook User [ 20/Jun/18 ]

Author:

{'username': 'ajdavis', 'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com'}

Message: CDRIVER-2558 prohibit per-operation options in txn

Users cannot pass read concern, write concern, or read preference to
"with_opts" functions in a transaction. To prevent this, keep the user's
read preference separate from the inherited read preference until it can
be checked in _mongoc_client_command_with_opts().

Most drivers don't allow these 3 options to be set per-operation, so the Transactions Spec doesn't test that setting them is prohibited in a
transaction. The new test file opts.yml uses the Transaction Spec's test
format for C Driver-specific tests of this scenario.

Also implement CDRIVER-2704, included upsertedCount in replies from mongoc_collection_update_one, update_many, and replace_one: it's useful
and allows us to use standard CRUD test specifications. Update our test
runner to use CRUD functions like mongoc_collection_insert_one instead
of using mongoc_bulk_operation_t for all writes.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/84d7dda4232f102fec5b090b7a863df6139fa480

Generated at Wed Feb 07 21:16:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.