Add promoteUUIDs option to the BSON deserialization API in js-bson

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Unknown
    • bson-4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Description

      A new option promoteUUIDs will be added to our BSON library. It will control the type that Binary subtype 4s are deserialized to. The driver will adopt and offer this option on the MongoClient, Db, Collection, and CRUD API layers repeating the pattern of BSON option inheritance.

      Acceptance Criteria

      Implementation Requirements

      •  Have BSON type return UUID when promoteValues = true, otherwise return Binary

      Testing Requirements

      • Test Binary.toUUID() error cases are appropriately raised from deserialization when promoteUUIDs is enabled. (ex. Byte array incorrect length)

      Documentation Requirements

      • Follow up with team

            Assignee:
            Durran Jordan
            Reporter:
            Aditi Khare (Inactive)
            Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: