[CDRIVER-1526] Rename "_with_write_concern" functions to "_with_opts" Created: 07/Sep/16 Updated: 02/Jun/18 Resolved: 13/Sep/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | 1.5.0 |
| Fix Version/s: | 1.5.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Epic Link: | Flexible opts | ||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Description |
|
Rename "_with_write_concern" functions (introduced in
For consistency with the rest of our API, the final parameters of each of these functions should be ordered like:
Or:
Their internal helper _mongoc_client_command_with_write_concern should become:
This function accepts a const bson_t "opts" instead of a mongoc_write_concern_t. Users can easily pass us a mongoc_write_concern_t in "opts" using mongoc_write_concern_append. The same rules currently enforced by _mongoc_client_command_with_write_concern MUST be enforced by the new _mongoc_client_command_with_opts:
Besides "writeConcern", I think other fields in "opts" are appended to the command without any validation. |
| Comments |
| Comment by Githook User [ 13/Sep/16 ] |
|
Author: {u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}Message: These function now take a generic bson_t options, which can contain To add write_concern to the these commands, add it to the generic opts Removed
Their respective function without _with_opts had opts parameter that |
| Comment by Hannes Magnusson [ 13/Sep/16 ] |