Interface ReactiveUpdateOperation.TerminatingUpdate<T>
- All Superinterfaces:
ReactiveUpdateOperation.FindAndModifyWithOptions<T>, ReactiveUpdateOperation.TerminatingFindAndModify<T>
- Enclosing interface:
ReactiveUpdateOperation
public static interface ReactiveUpdateOperation.TerminatingUpdate<T>
extends ReactiveUpdateOperation.TerminatingFindAndModify<T>, ReactiveUpdateOperation.FindAndModifyWithOptions<T>
Compose update execution by calling one of the terminating methods.
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptionMono<com.mongodb.client.result.UpdateResult> all()Update all matching documents in the collection.Mono<com.mongodb.client.result.UpdateResult> first()Update the first document in the collection.Mono<com.mongodb.client.result.UpdateResult> upsert()Creates a new document if no documents match the filter query or updates the matching ones.Methods inherited from interface ReactiveUpdateOperation.FindAndModifyWithOptions
withOptionsMethods inherited from interface ReactiveUpdateOperation.TerminatingFindAndModify
findAndModify, map
-
Method Details
-
all
Mono<com.mongodb.client.result.UpdateResult> all()Update all matching documents in the collection.- Returns:
- never null.
-
first
Mono<com.mongodb.client.result.UpdateResult> first()Update the first document in the collection.- Returns:
- never null.
-
upsert
Mono<com.mongodb.client.result.UpdateResult> upsert()Creates a new document if no documents match the filter query or updates the matching ones.- Returns:
- never null.
-