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

Refactor AutoGet* Options to use designated intialisers

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Storage Execution
    • Execution EMEA Team 2023-09-04, Execution EMEA Team 2023-10-02

      We follow a pattern where the OptionsBase struct contains seemingly private members (e.g. _viewMode) with setter functions which emulate designated initialisers.

      e.g. to initialise with a viewmode and a deadline.

      AutoGetCollection::Options{}.viewMode(auto_get_collection::ViewMode::kViewsPermitted).deadline(someDeadline);

      It is confusing because those members are not really private, and are being accessed when using the options. Now that we have designated initialisers we could improve how we initialise options.

            Assignee:
            yujin.kang@mongodb.com Yujin Kang Park
            Reporter:
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: