-
Type:
Task
-
Resolution: Won't Do
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: 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
- is related to
-
NODE-4419 Add promoteUUIDs option to the BSON deserialization API in js-bson
-
- Closed
-