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

BSON Timestamp should wrap its value and present as an unsigned long

    XMLWordPrintable

Details

    • Improvement
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • bson-4.0.4
    • bson-5.0.0
    • None

    Description

      The current implementation of Timestamp extends the Long type, exposing all the functionality of that class and erroneously supporting signed values. Additionally, in later versions of node we have access to the BigInt type, obviating the need for Long in the first place. A few refactors are in order:

      • Don't subclass Long but instead wrap an internal value, giving us the option of using BigInt if its available
      • Change the constructor signature to match the server's Timestamp (time_t, ordinal)
      • Validate that inputs are not signed

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              matt.broadstone@mongodb.com Matt Broadstone
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: