Kotlin BSON • Multiplatform abstraction for different BSON implementations • opensavvy.ktmongo.bson.types • ObjectIdGenerator • newId
newId¶
@ExperimentalTime
abstract fun newId(): ObjectId
Creates a new instance of an ObjectId
.
Throws¶
NoSuchElementException
-
If the generator is not able to generate more IDs.