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

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: bson-4.0.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.broadstone Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: