Skip to content

Shared utilities for the sync- and coroutines-based KtMongo drivers based on the official Kotlin driveropensavvy.ktmongo.officialJvmBsonContext

JvmBsonContext

class JvmBsonContext(bsonFactory: JvmBsonFactory, objectIdGenerator: ObjectIdGenerator, nameStrategy: PropertyNameStrategy) : BsonContext, JvmBsonFactory, ObjectIdGenerator, PropertyNameStrategy

Constructors

JvmBsonContext

constructor(bsonFactory: JvmBsonFactory, objectIdGenerator: ObjectIdGenerator, nameStrategy: PropertyNameStrategy)

Properties

codecRegistry

@LowLevelApi
open override val codecRegistry: CodecRegistry

Functions

buildArray

@LowLevelApi
open override fun buildArray(block: BsonValueWriter.() -> Unit): BsonArray
@LowLevelApi
open override fun buildArray(instance: BsonValueWriteable): BsonArray

buildDocument

@LowLevelApi
open override fun buildDocument(block: BsonFieldWriter.() -> Unit): Bson
@LowLevelApi
open override fun buildDocument(instance: BsonFieldWriteable): Bson
@LowLevelApi
open override fun <T : Any> buildDocument(obj: T, type: KType, klass: KClass<T>): Bson

newId

@ExperimentalTime
open override fun newId(): ObjectId

pathOf

@LowLevelApi
open override fun pathOf(property: KProperty1<*, *>): Path

readArray

@LowLevelApi
open override fun readArray(bytes: ByteArray): BsonArray

readDocument

@LowLevelApi
open override fun readDocument(bytes: ByteArray): Bson