ObjectId

interface ObjectId : Comparable<ObjectId>

A globally unique identifier for objects.

Consists of 12 bytes, divided as follows: A 4-byte timestamp, representing the ObjectId's creation, measured in seconds since the Unix epoch. A 5-byte random value generated once per process. This random value is unique to the machine and process. A 3-byte incrementing counter, initialized to a random value.

Types

Companion
Link copied to clipboard
object Companion

Functions

compareTo
Link copied to clipboard
abstract operator fun compareTo(other: ObjectId): Int

Extensions

asBsonObjectId
Link copied to clipboard
fun ObjectId.asBsonObjectId(): BsonObjectId