[DRIVERS-128] Support the SingleRemove flag in OP_DELETE for pre-2.6 servers Created: 03/Dec/13  Updated: 15/Apr/19  Resolved: 08/Feb/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Barrie Segal Assignee: Barrie Segal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on PYTHON-605 Support "multi" option for Collection... Closed
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-605 Done 2.7

 Description   

This is needed to support the bulk API removeOne method when connected to pre-2.6 versions of MongoDB. A new parameter should be added to the existing remove method, named "multi" to match the update method. When set to true (the default) remove will keep its current behavior of removing all documents that match the query criteria. When set to false only the first matching document is removed. The server behavior is configured through the SingleRemove option of OP_DELETE:

http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-delete

If your driver already supports this behavior, regardless of existing parameter name, no changes are required. Just validate this ticket.



 Comments   
Comment by Andrew Morrow (Inactive) [ 03/Mar/15 ]

Validating for C++11 because validated for C

Generated at Thu Feb 08 08:20:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.