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

Add Double as a schema type to Mongoose

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • mongoose-8.9
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      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

      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

            Assignee:
            aditi.khare@mongodb.com Aditi Khare
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Bailey Pearson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: