Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-20744

Remove redundant code paths for setting a Value in a MutableDocument

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.1.8
    • Labels:
      None
    • Query Execution
    • Fully Compatible

      Currently there are a couple ways to set a field of a MutableDocument to a new value. The only one two that are move optimized are:

      doc.getField(fieldName) = Value(val);
      doc.getNestedField(fieldName) = Value(val);
      

      We should remove all variants of MutableDocument::setField and MutableDocument::setNestedField in favor of the above strategy. We should also remove MutableDocument::getField in favor of MutableDocument::operator[]

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: