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

Round trip Symbols, DBPointers, and Undefineds correctly

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.1.0
    • Component/s: None
    • Labels:

      Description

      When we encounter the deprecated BSON types Symbol and DBPointer in documents, we return them as Strings and Documents, respectively. So if you round trip these types you do not get the same result out. 

      When we encounter a BSON undefined, we just error, which is even worse. This has been a problem for the Stitch team as they decode server responses that may contain an undefined.

      We should expose all of these types in the public API, but make their initializers internal so that users cannot create new ones themselves in the driver, and can only read them out of existing documents.

       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: