Embed inheritance of properties in Collection, Db, and MongoClient

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • next
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We currently use utility functions like resolveReadPreference, in order to determine the correct read preference/write concern/read concern for operations. These should become properties of the potential sources for inheritance (e.g. MongoClient.readPreference, Db.readConcern), and those getters should look for inherited values in the absence of a set value, e.g.

      class Db {
        get readPreference() {
          if (this.s.readPreference == null) {
            return this.s.client.readPreference;
          }
      
          return this.s.readPreference;
        }
      }

              Assignee:
              Katherine Walker (Inactive)
              Reporter:
              Katherine Walker (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: