Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-2194

Provide alternative to adjacent parameters of the same type for update_one

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            clyde.bazile@mongodb.com Clyde Bazile III (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: