Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MongoDB Kotlin sync/coroutine Driver. #4402

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

christophstrobl
Copy link
Member

@christophstrobl christophstrobl commented Jun 7, 2023

Provide an extension for SimpleMongoClientDatabaseFactory & SimpleReactiveMongoDatabaseFactory that accepts a com.mongodb.kotlin.client.MongoClient respectively com.mongodb.kotlin.client.coroutine.MongoClient

Since the Kotlin driver is wrapping the Java driver we can unwrap the instance and pass it on to the factory.

Though unfortunate that there's no public API to access the wrapped instance the provided tests will alert on driver changes.

Closes: #4393

@christophstrobl christophstrobl linked an issue Jun 7, 2023 that may be closed by this pull request
@christophstrobl
Copy link
Member Author

@rozza would it be possible to have some public API in the Kotlin driver to access the underlying Java driver? Currently we need to use reflection to get hold on the wrapped client.

@christophstrobl christophstrobl changed the title Add support for sync Kotlin MongoDB Driver. Add support for MongoDB Kotlin sync/coroutine Driver. Jul 21, 2023
@christophstrobl christophstrobl marked this pull request as ready for review July 21, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for sync MongoDB Kotlin driver
2 participants