Kotlin BSON • Pure Kotlin Multiplatform implementation • opensavvy.ktmongo.bson.multiplatform • BsonContext
BsonContext¶
class BsonContext(objectIdGenerator: ObjectIdGenerator = ObjectIdGenerator.Default()) : BsonContext, ObjectIdGenerator
Constructors¶
BsonContext
¶
constructor(objectIdGenerator: ObjectIdGenerator = ObjectIdGenerator.Default())
Functions¶
buildArray
¶
open fun buildArray(instance: BsonValueWriteable): BsonArray
@LowLevelApi
open override fun buildArray(block: BsonValueWriter.() -> Unit): BsonArray
buildDocument
¶
open fun buildDocument(instance: BsonFieldWriteable): Bson
@LowLevelApi
open override fun buildDocument(block: BsonFieldWriter.() -> Unit): Bson
newId
¶
open override fun newId(): ObjectId
readArray
¶
readDocument
¶
@LowLevelApi
open override fun readDocument(bytes: ByteArray): Bson