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

Get rid of old BSON APIs with few users and better replacements

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Programmability 2024-11-11, Programmability 2024-11-25

      We should scrub out the remaining few users of the following APIs so that they can be removed:

      • BSONForEach — Replace with range-for loop
      • BSONObjIterator::moreWithEoo() — Use more() and remove if (e.eoo()) break;. Consider rewriting to use range-for loop.
      • BSONObj::getObjectId — Use if (auto id = obj["_id"]; id) {...}
      • BSONObj::removeFields(std::set<std::string>) — Use the StringDataSet overload instead.

            Assignee:
            adithi.raghavan@mongodb.com Adithi Raghavan
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: