Skip to content

Conversation

@rozza
Copy link
Member

@rozza rozza commented Feb 22, 2023

Wraps the driver-reactivestreams to provide a kotlin coroutine API

In general a faithful wrapping of the reactivestreams driver but with coroutine support instead of using Publishers. Uses reified overloads to provide synaptic sugar instead of passing resultClass.

JAVA-4870

Todo

  • Confirm package namespace - currently com.mongodb.kotlin.client.coroutine

mongodb#1087)

* Update Javadoc
* Add notNull assertion in ClientEncryptionSettings constructor
* Remove unnecessary null checks and corresponding SpotBugs exclusions for them

JAVA-4861
@rozza rozza requested a review from jyemin February 22, 2023 16:12
@rozza rozza marked this pull request as ready for review February 22, 2023 16:12
@rozza rozza marked this pull request as draft March 2, 2023 10:50
@rozza
Copy link
Member Author

rozza commented Mar 2, 2023

Converted to draft until #1090 has been completed

@rozza rozza added the kotlin label Mar 6, 2023
jyemin and others added 9 commits March 9, 2023 08:30
…b#1092)

Instead, check for session support during operation execution
after the connection is checked out.
On 4.0 sharded clusters, the create collection command often fails
with error code 11601 (Interrupted).  Work around it by retrying
the command.

JAVA-4883
Wraps the driver-sync to provide a kotlin sync API

In general a faithful wrapping of the sync java driver. Uses reified
overloads to provide synaptic sugar instead of passing resultClass.

MongoIterable deviates from the sync API so to not implement Iterable in
order to protect the user from leaving open cursors. In Kotlin there are two Iterable
style implementations: Iterable and Sequence neither are auto closable.
Sequence is more appropriate here as it lazily consumes the iterator,
but it does not auto close. See: https://youtrack.jetbrains.com/issue/KT-34719
So MongoIterable provides a loan method that treats the cursor as a
Sequence and automatically closes after use.

JAVA-4869
Library adds Bson support for Kotlin data classes

Follows the spirit of the bson-record-codec library

JAVA-4872
Expanded the test cases
Simplified the DataClassCodecProvider

JAVA-4872 JAVA-4873
Wraps the driver-reactivestreams to provide a kotlin coroutine API

In general a faithful wrapping of the reactivestreams driver but with coroutine
support instead of using Publishers. Uses reified overloads to provide
synaptic sugar instead of passing resultClass.

JAVA-4870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants