Class RemoteUpdateOptions
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.RemoteUpdateOptions
-
- Direct Known Subclasses:
SyncUpdateOptions
public class RemoteUpdateOptions extends Object
The options to apply when updating documents.
-
-
Constructor Summary
Constructors Constructor Description RemoteUpdateOptions()
-
Method Summary
Modifier and Type Method Description boolean
isUpsert()
Returns true if a new document should be inserted if there are no matches to the query filter.String
toString()
RemoteUpdateOptions
upsert(boolean upsert)
Set to true if a new document should be inserted if there are no matches to the query filter.
-
-
-
Method Detail
-
isUpsert
public boolean isUpsert()
Returns true if a new document should be inserted if there are no matches to the query filter. The default is false.- Returns:
- true if a new document should be inserted if there are no matches to the query filter
-
upsert
public RemoteUpdateOptions upsert(boolean upsert)
Set to true if a new document should be inserted if there are no matches to the query filter.- Parameters:
upsert
- true if a new document should be inserted if there are no matches to the query filter.- Returns:
- this
-
-