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

Kotlin coroutine update. #1135

Merged
merged 3 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import org.bson.conversions.Bson
* @param T The type of the result.
* @see [Aggregation command](https://www.mongodb.com/docs/manual/reference/command/aggregate)
*/
public class AggregateFlow<T : Any>(private val wrapped: AggregatePublisher<T>) : Flow<T> {
public class AggregateFlow<T : Any>(private val wrapped: AggregatePublisher<T>) : Flow<T> by wrapped.asFlow() {

/**
* Sets the number of documents to return per batch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import org.bson.conversions.Bson
* @param T The type of the result.
* @see [Distinct command](https://www.mongodb.com/docs/manual/reference/command/distinct/)
*/
public class DistinctFlow<T : Any>(private val wrapped: DistinctPublisher<T>) : Flow<T> {
public class DistinctFlow<T : Any>(private val wrapped: DistinctPublisher<T>) : Flow<T> by wrapped.asFlow() {

/**
* Sets the number of documents to return per batch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import org.bson.conversions.Bson
* @param T The type of the result.
* @see [Collection filter](https://www.mongodb.com/docs/manual/reference/method/db.collection.find/)
*/
public class FindFlow<T : Any>(private val wrapped: FindPublisher<T>) : Flow<T> {
public class FindFlow<T : Any>(private val wrapped: FindPublisher<T>) : Flow<T> by wrapped.asFlow() {

/**
* Sets the number of documents to return per batch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import org.bson.conversions.Bson
* @param T The type of the result.
* @see [List collections](https://www.mongodb.com/docs/manual/reference/command/listCollections/)
*/
public class ListCollectionsFlow<T : Any>(private val wrapped: ListCollectionsPublisher<T>) : Flow<T> {
public class ListCollectionsFlow<T : Any>(private val wrapped: ListCollectionsPublisher<T>) :
Flow<T> by wrapped.asFlow() {
/**
* Sets the maximum execution time on the server for this operation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import org.bson.conversions.Bson
* @param T The type of the result.
* @see [List databases](https://www.mongodb.com/docs/manual/reference/command/listDatabases/)
*/
public class ListDatabasesFlow<T : Any>(private val wrapped: ListDatabasesPublisher<T>) : Flow<T> {
public class ListDatabasesFlow<T : Any>(private val wrapped: ListDatabasesPublisher<T>) : Flow<T> by wrapped.asFlow() {
/**
* Sets the maximum execution time on the server for this operation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import org.bson.BsonValue
* @param T The type of the result.
* @see [List indexes](https://www.mongodb.com/docs/manual/reference/command/listIndexes/)
*/
public class ListIndexesFlow<T : Any>(private val wrapped: ListIndexesPublisher<T>) : Flow<T> {
public class ListIndexesFlow<T : Any>(private val wrapped: ListIndexesPublisher<T>) : Flow<T> by wrapped.asFlow() {
/**
* Sets the maximum execution time on the server for this operation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import org.bson.conversions.Bson
* @see [Map Reduce](https://www.mongodb.com/docs/manual/reference/command/mapReduce/)
*/
@Deprecated("Map Reduce has been deprecated. Use Aggregation instead", replaceWith = ReplaceWith(""))
public class MapReduceFlow<T : Any>(private val wrapped: MapReducePublisher<T>) : Flow<T> {
public class MapReduceFlow<T : Any>(private val wrapped: MapReducePublisher<T>) : Flow<T> by wrapped.asFlow() {
/**
* Sets the number of documents to return per batch.
*
Expand Down