[CDRIVER-2195] Clarify write concern usage documentation for mongoc_database_create_collection Created: 21/Jun/17  Updated: 28/Oct/23  Resolved: 29/Jun/17

Status: Closed
Project: C Driver
Component/s: docs, libmongoc
Affects Version/s: None
Fix Version/s: 1.7.0

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

Backwards Compatibility: Fully Compatible

 Description   

The documentation for mongoc_database_create_collection states that "The mongoc_write_concern_t specified on the mongoc_database_t will be used, if any."

Upon reviewing the source of the function, it seems that it calls mongoc_client_command_with_opts which will actually use any write concern specified in the opts bson document passed in.

The docs should probably read "Write concern is applied from opts, or else from database." as in other database functions.

I'm not sure if this is the only case as I've only really looked at this one.



 Comments   
Comment by Githook User [ 30/Jun/17 ]

Author:

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

Message: CDRIVER-2195 fix some write concern docs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/4148c997db04adf5fff1f5faa551be1452ced25b

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