Docs Menu

Class UpdateOptions

On this page

  • io.realm.mongodb.mongo.options
  • Constructors
  • Method Summary
  • Inherited Methods
  • Constructor Detail
  • Method Detail
  • isUpsert
  • toString
  • upsert
java.lang.Object
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 InsertManyResultio.realm.mongodb.mongo.result →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.