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

Remove Timestamp legacy constructor from low/high order bits

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • Not Needed
    • Not Needed

      Use Case

      We deprecated the 2 argument Timestamp constructor taking low/high order bits. We should remove this constructor support.

      User Impact

      • Migration will require code changes
        • Any instance of new Timestamp(low: number, high: number) will need to be wrapped in Long construction or broken into the i, t style constructor.

      Acceptance Criteria

      Implementation Requirements

      • Remove support for the constructor overload that takes two plain numbers as input
      • Since removing support will likely lead to a runtime error (props not existing etc.) add a helpful error to be thrown if this usage is detected.

      Testing Requirements

      • Assert the constructor fails in the old usage case
      • Update any Timestamp tests to use the i, t style constructor

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: