Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-2381

Extending Comparison API for `primitive.Timestamp`

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

      Summary

      The `primative.Timestamp` struct only has one comparison method that is sort of hard to use without reading the code.  It might be helpful to add `Before` and `After` receiver functions in the style of the time package.

      Motivation

      Who is the affected end user?

      Clients using the `primitive.Timestamp` struct with bson documents.

      How does this affect the end user?

      This would add a more comprehensive API to our timestamps that follow practice established by a package would likely be familiar with, i.e .the go time package.

      How likely is it that this problem or use case will occur?

      This functionality would probably not be needed often.

      If the problem does occur, what are the consequences and how severe are they?

      Very minor inconvenience.

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      No.

            Assignee:
            Unassigned Unassigned
            Reporter:
            preston.vasquez@mongodb.com Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: