-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: BSON
Use Case
As a MongoDB engineer
I want accessors for the i and t properties of the Timestamp class
So that I can fetch those properties in a readable way as opposed to low and high
User Impact
- New feature
Dependencies
- None
Unknowns
- None
Acceptance Criteria
Implementation Requirements
- Add getters for i and t that return the unsigned int form of the increment and timestamp
- i is low, t is high
- Unsigned right shift (>>>) can be used to obtain the unsigned representation
- This will make a Timestamp instance compatible as input to the Timestamp constructor
Testing Requirements
- Ensure i and t return the correct values
- Test timestamp as constructor input
Documentation Requirements
- Add TSDoc to the getters describing the segment of the Timestamp they return and the format the number is returned in.
Follow Up Requirements
- None