Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NODE-6031): add t and i to Timestamp #704

Merged
merged 3 commits into from
Jul 19, 2024
Merged

Conversation

nbbeeken
Copy link
Contributor

@nbbeeken nbbeeken commented Jul 19, 2024

Description

What is changing?

  • add t and i getters to Timestamp
  • change internals to use getters
Is there new documentation needed for these changes?

No

What is the motivation for this change?

  • users do not have to recall whether t or i is the high or low bits
  • a Timestamp can be constructed from another Timestamp

Release Highlight

Timestamp now has t and i properties

To make this type a bit easier to use we are surfacing the breakdown of the two internal 32 bit segments of a Timestamp value.

const ts = new Timestamp({ i: 2, t: 1 });
ts.i // 2
ts.t // 1

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@aditi-khare-mongoDB aditi-khare-mongoDB self-requested a review July 19, 2024 18:12
Copy link
Contributor

@aditi-khare-mongoDB aditi-khare-mongoDB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small testing naming change, thanks for finishing this up so quick!

@aditi-khare-mongoDB aditi-khare-mongoDB self-assigned this Jul 19, 2024
@aditi-khare-mongoDB aditi-khare-mongoDB added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jul 19, 2024
@aditi-khare-mongoDB aditi-khare-mongoDB merged commit b766d0f into main Jul 19, 2024
8 checks passed
@aditi-khare-mongoDB aditi-khare-mongoDB deleted the NODE-6031-ts-i-t branch July 19, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Primary Review In Review with primary reviewer, not yet ready for team's eyes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants