Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2195

Clarify write concern usage documentation for mongoc_database_create_collection

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.7.0
    • Affects Version/s: None
    • Component/s: Docs, libmongoc
    • None
    • Fully Compatible

      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.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: