-
Type: Task
-
Resolution: Done
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
Use Case
As a... mongoose user
I want... to provide accurate information to BSON
So that... I can use encryption properly for numeric types
Acceptance Criteria
Implementation Requirements
- Create a schemaType subclass for Double
- This PR will be merged directly to the mongoose dev master branch
Testing Requirements
- Follow testing for existing schemaTypes
- Test that in the following cases the Double SchemaType throws
- invalid value (after numeric coercion)
- Integration tests
- When a model with an Double field is inserted, then the correct BSON type of Double is inserted for that field
- When promoteValues is not set / undefined / false and a document with an Double is fetched / find(), then a number is returned
- When promoteValues is set and a document with an Double is fetched / find(), then a BSON Double Type Class is returned
Documentation Requirements
- Add API documentation