Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4418

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

    • Type: Icon: Task Task
    • Resolution: Won't Do
    • Priority: Icon: Unknown Unknown
    • None
    • 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

      • Add promoteUUID option to BSON library that returns bson type UUID when promoteValues = true, otherwise returns binary type
      • C++ code need to be modified to know about the UUID class, it currently doesn't have logic to look for that constructor

      Testing Requirements

      • Test Binary.toUUID() error cases are appropriately raised from deserialization when promoteUUIDs is enabled. (ex. Byte array incorrect length)
      • All tests written for js-bson should be brought to the bson-ext repo, it will also support the same promoteUUIDs option and will have the exact same behavior.

      Documentation Requirements

      • Follow up with team

            Assignee:
            Unassigned Unassigned
            Reporter:
            aditi.khare@mongodb.com Aditi Khare (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: