[GODRIVER-736] Add comparison methods to primitive.Timestamp Created: 21/Dec/18 Updated: 28/Oct/23 Resolved: 31/May/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | BSON |
| Affects Version/s: | 0.1.0 |
| Fix Version/s: | 1.1.0 |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | David Golden | Assignee: | Run Tian Yu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Tools and mongomirror do lots of timestamp comparison. It would be helpful if the primitive.Timestamp type also provided comparison methods like Greater and GreaterOrEqual, or just a Cmp method (returning -1, 0, 1). |
| Comments |
| Comment by Githook User [ 31/May/19 ] |
|
Author: {'name': 'Connie Yu', 'email': 'connie.yu@10gen.com', 'username': 'connieyu'}Message: Add Compare method to primitive.Timestamp Change-Id: I89dfaeb3cb6e9d17ffe1d4574be483e2e115f3cd |
| Comment by Divjot Arora (Inactive) [ 31/May/19 ] |
|
We plan to add a general Compare(lhs, rhs primitive.Timestamp) function that returns -1 if lhs < rhs, 1 if lhs > rhs, and 0 if lhs = rhs. |