[CXX-2194] Provide alternative to adjacent parameters of the same type for update_one Created: 11/Feb/21 Updated: 30/Jun/23 |
|
| Status: | Backlog |
| Project: | C++ Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Clyde Bazile III (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | size-small | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | CXX usability improvements |
| Description |
|
As of now, the constructor for model::update_one requires a filter and update document. Because these two parameters are the same type switching them will result in a server error. Generally, this should be avoided (see Avoid adjacent parameters of the same type when changing the argument order would change meaning). A simple solution could be to add a setter for the filter and/or the update value. |