Skip to content

Kotlin BSON • Multiplatform abstraction for different BSON implementationsopensavvy.ktmongo.bson.typesTimestamp

Timestamp

class Timestamp(val value: ULong) : Comparable<Timestamp> 

Internal MongoDB timestamp used in the oplog.

Use the kotlin.time.Instant type for operations involving dates.

Constructors

Timestamp

@ExperimentalTime
constructor(instant: Instant, counter: UInt)

Constructs a timestamp from its Timestamp.instant and Timestamp.counter components.

constructor(value: ULong)

Types

Companion

object Companion

Properties

counter

val counter: UInt

Incrementing counter.

instant

Date and time represented by this Timestamp, with a precision of one second.

value

val value: ULong

The raw value for this Timestamp.

Functions

compareTo

open operator override fun compareTo(other: Timestamp): Int

equals

open operator override fun equals(other: Any?): Boolean

hashCode

open override fun hashCode(): Int

toString

open override fun toString(): String