BsonContext

BSON configuration for the objects generated by the DSL.

This object is passed through the entire DSL to allow accessing the configuration from anywhere during request generation.

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun buildDocument(block: BsonFieldWriter.() -> Unit): Bson
abstract fun <T : Any> buildDocument(obj: T, type: KType, klass: KClass<T>): Bson
Link copied to clipboard
abstract fun newId(): ObjectId
Link copied to clipboard
abstract fun pathOf(property: KProperty1<*, *>): Path

Generates the name of a property.

Link copied to clipboard
Link copied to clipboard
abstract fun readDocument(bytes: ByteArray): Bson