Docs Menu

Docs HomeDevelop ApplicationsAtlas Device SDKs

Class UpdateOptions

On this page

  • io.realm.mongodb.mongo.options
  • Constructors
  • Method Summary
  • Inherited Methods
  • Constructor Detail
  • Method Detail
  • isUpsert
  • toString
  • upsert
io.realm.mongodb.mongo.options.UpdateOptions

The options to apply when updating documents.

Constructor and Description
Modifier and Type
Method and Description
public boolean

Returns true if a new document should be inserted if there are no matches to the query filter.

public String
boolean upsert
)

Set to true if a new document should be inserted if there are no matches to the query filter.

  • Methods inherited from class java.lang.Object : getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

public UpdateOptions ()

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

public String toString ()

Overrides

toString in class Object

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

← Class InsertManyResult