Uploaded image for project: 'Swift Driver'
  1. Swift Driver
  2. SWIFT-311

MongoClient/Database/Collection ReadPreference getters should not return Optionals

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.1
    • Component/s: None
    • Labels:

      Description

      MongoClient.readPreferenceMongoDatabase.readPreference, and MongoCollection.readPreference are computed properties which all return a ReadPreference?, aka an optional ReadPreference.

      However, none of those getters will ever actually return nil now. They always return a value.

      We should update the return type of all these computed properties so that they are non-optional {{ReadPreference}}s instead.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: