diff --git a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/AggregateFlow.kt b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/AggregateFlow.kt index 787f7fbd222..683746efc96 100644 --- a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/AggregateFlow.kt +++ b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/AggregateFlow.kt @@ -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(private val wrapped: AggregatePublisher) : Flow { +public class AggregateFlow(private val wrapped: AggregatePublisher) : Flow by wrapped.asFlow() { /** * Sets the number of documents to return per batch. diff --git a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/DistinctFlow.kt b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/DistinctFlow.kt index edca50a58b0..3583e4a2390 100644 --- a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/DistinctFlow.kt +++ b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/DistinctFlow.kt @@ -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(private val wrapped: DistinctPublisher) : Flow { +public class DistinctFlow(private val wrapped: DistinctPublisher) : Flow by wrapped.asFlow() { /** * Sets the number of documents to return per batch. diff --git a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/FindFlow.kt b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/FindFlow.kt index 5f5381a85f3..ed0992b1bf7 100644 --- a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/FindFlow.kt +++ b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/FindFlow.kt @@ -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(private val wrapped: FindPublisher) : Flow { +public class FindFlow(private val wrapped: FindPublisher) : Flow by wrapped.asFlow() { /** * Sets the number of documents to return per batch. diff --git a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListCollectionsFlow.kt b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListCollectionsFlow.kt index a35273046ac..bc205b7073f 100644 --- a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListCollectionsFlow.kt +++ b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListCollectionsFlow.kt @@ -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(private val wrapped: ListCollectionsPublisher) : Flow { +public class ListCollectionsFlow(private val wrapped: ListCollectionsPublisher) : + Flow by wrapped.asFlow() { /** * Sets the maximum execution time on the server for this operation. * diff --git a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListDatabasesFlow.kt b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListDatabasesFlow.kt index ad642da8d25..4b56333bb38 100644 --- a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListDatabasesFlow.kt +++ b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListDatabasesFlow.kt @@ -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(private val wrapped: ListDatabasesPublisher) : Flow { +public class ListDatabasesFlow(private val wrapped: ListDatabasesPublisher) : Flow by wrapped.asFlow() { /** * Sets the maximum execution time on the server for this operation. * diff --git a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListIndexesFlow.kt b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListIndexesFlow.kt index cacd0853a72..9e856d28ee3 100644 --- a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListIndexesFlow.kt +++ b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/ListIndexesFlow.kt @@ -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(private val wrapped: ListIndexesPublisher) : Flow { +public class ListIndexesFlow(private val wrapped: ListIndexesPublisher) : Flow by wrapped.asFlow() { /** * Sets the maximum execution time on the server for this operation. * diff --git a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/MapReduceFlow.kt b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/MapReduceFlow.kt index b43fd8e2818..aef6ffedb31 100644 --- a/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/MapReduceFlow.kt +++ b/driver-kotlin-coroutine/src/main/kotlin/com/mongodb/kotlin/client/coroutine/MapReduceFlow.kt @@ -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(private val wrapped: MapReducePublisher) : Flow { +public class MapReduceFlow(private val wrapped: MapReducePublisher) : Flow by wrapped.asFlow() { /** * Sets the number of documents to return per batch. *