All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.extensions.BsonRaptorComponent.kt Maven / Gradle / Ivy

There is a newer version: 0.27.0
Show newest version
package io.fluidsonic.raptor.mongo

import com.mongodb.*
import io.fluidsonic.raptor.*
import io.fluidsonic.raptor.bson.*

private val mongoClientDefaultCodecsIncludedComponentExtensionKey = RaptorComponentExtensionKey("MongoClient default codecs included")


@RaptorDsl
public fun RaptorBsonComponent.includeMongoClientDefaultCodecs() {
	if (extensions[mongoClientDefaultCodecsIncludedComponentExtensionKey] != true) {
		extensions[mongoClientDefaultCodecsIncludedComponentExtensionKey] = true

		providers(MongoClientSettings.getDefaultCodecRegistry(), priority = RaptorBsonDefinition.Priority.low)
	}
}


@RaptorDsl
public fun RaptorAssemblyQuery.includeMongoClientDefaultCodecs() {
	this {
		includeMongoClientDefaultCodecs()
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy