[CDRIVER-2304] Deprecate mongoc_collection_update Created: 27/Sep/17 Updated: 28/Oct/23 Resolved: 30/Oct/17 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc |
| Affects Version/s: | None |
| Fix Version/s: | 1.9.0 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | 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: |
|
||||||||||||||||
| Description |
|
mongoc_collection_update does not take a bson_t for options, but instead appends options to the command based on options from the flags argument (for multi, and upsert). Unfortunately there is no way to pass "collation" or "arrayFilters" to this function. We should deprecate use of this function after creating new functions mongoc_collection_update_one_with_opts and mongoc_collection_update_many_with_opts. |
| Comments |
| Comment by A. Jesse Jiryu Davis [ 30/Oct/17 ] | |
|
Closing. I'm not going to mark mongoc_collection_update with BSON_GNUC_DEPRECATED_FOR since that could cause more disruption than it's worth in users' code. Kevin has documented it:
It's ok for mongoc_collection_save to continue calling this superseded function, in any case, since mongoc_collection_save itself is actually deprecated. If there is ever a libmongoc 2.0 we can choose to delete mongoc_collection_save and mongoc_collection_update simultaneously. | |
| Comment by Githook User [ 25/Oct/17 ] | |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Merge remote-tracking branch 'upstream/master'
| |
| Comment by Kevin Albertson [ 16/Oct/17 ] | |
|
I did not add the BSON_GNUC_DEPRECATED_FOR to collection_update because it is If I were to replace this call with collection_update_one or If we do add an option, than we can easily replace the call to collection_update | |
| Comment by Githook User [ 16/Oct/17 ] | |
|
Author: {'email': 'kevin.albertson@10gen.com', 'name': 'Kevin Albertson', 'username': 'kevinAlbs'}Message: |