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

BSONValue.fromIterator should return Self, not BSONValue

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 0.0.8
    • None
    • None

    Description

      Currently, the BSONValue protocol contains:

      static func from(iterator iter: DocumentIterator) throws -> BSONValue

      It was initially written this way to handle that we wanted it to support deprecated BSON types being upconverted to other BSON types - i.e. DBPointer to a DBRef Document. However, we've now handled that logic elsewhere and we just throw from the , and we can make the protocol requirement more strict:

      static func from(iterator iter: DocumentIterator) throws -> Self

      This work involves introducing a new type to represent BSON nulls due to some weird behavior experienced on Linux platforms when using NSNull.

      Attachments

        Activity

          People

            patrick.freed@mongodb.com Patrick Freed
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: