fun withCodecRegistry(codecRegistry: CodecRegistry): CoroutineDatabase
(source)
Create a new MongoDatabase instance with a different codec registry.
codecRegistry
- the new org.bson.codecs.configuration.CodecRegistry for the collection
Return
a new MongoDatabase instance with the different codec registry