Package io.realm.mongodb.mongo.options
Class UpdateOptions
- java.lang.Object
-
- io.realm.mongodb.mongo.options.UpdateOptions
-
public class UpdateOptions extends Object
The options to apply when updating documents.
-
-
Constructor Summary
Constructors Constructor Description UpdateOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods 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()
UpdateOptions
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 UpdateOptions 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
-
-