Kotlin BSON • Multiplatform abstraction for different BSON implementations • opensavvy.ktmongo.bson.types • Timestamp
Timestamp¶
@Serializable
(with = Timestamp.Serializer::class)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
Serializer¶
@LowLevelApi
class Serializer : KSerializer<Timestamp>
Default serializer for Timestamp.
Properties¶
counter¶
Incrementing counter.
instant¶
@ExperimentalTime
val instant: Instant
Date and time represented by this Timestamp, with a precision of one second.
value¶
The raw value for this Timestamp.