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

Provide alternative to adjacent parameters of the same type for update_one

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None

    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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: