BSON Timestamp.
More...
#include <userver/formats/bson/types.hpp>
|
| Timestamp () |
| Creates an empty timestamp.
|
|
| Timestamp (uint32_t timestamp, uint32_t increment) |
| Creates a timestamp with specified values.
|
|
time_t | GetTimestamp () const |
| Returns stored unix timestamp.
|
|
uint32_t | GetIncrement () const |
| Returns stored increment.
|
|
uint64_t | Pack () const |
| Returns packed 64-bit timestamp value.
|
|
bool | operator== (const Timestamp &) const |
|
bool | operator!= (const Timestamp &) const |
|
bool | operator< (const Timestamp &) const |
|
bool | operator> (const Timestamp &) const |
|
bool | operator<= (const Timestamp &) const |
|
bool | operator>= (const Timestamp &) const |
|
|
static Timestamp | Unpack (uint64_t) |
| Restores a timestamp from the packed form.
|
|
BSON Timestamp.
- Warning
- Do not use this type for time point representation! It is very limited and intended for internal MongoDB use.
Definition at line 166 of file types.hpp.
◆ Timestamp()
formats::bson::Timestamp::Timestamp |
( |
| ) |
|
Creates an empty timestamp.
- Note
- MongoDB only replaces empty timestamps in top-level fields.
The documentation for this class was generated from the following file: