UpsertQuery
DSL for MongoDB operators that are used to update existing values, creating new documents if none exist (does not include aggregation operators).
This interface is a variant of UpdateQuery used in upsert operations. See UpdateQuery for more information.
If you can't find the operator you're searching for, visit the tracking issue.
Functions
Adds a new node as a child of this one.
Adds any number of nodes into this one.
Adds multiple values at the end of the array, unless they are already present.
Refers to child as a nested field of the current field.
Filters an array and performs the specified update only on the filtered items.
Makes this expression immutable.
Refers to a specific item in an array, by its index.
Refers to a specific item in a map, by its name.
Increments a field by the specified amount.
Removes the first element in the specified array.
Removes the last element in the specified array.
Removes all instances of value from the specified array.
Removes all items of an array that match predicate.
Removes all items of an array that match predicate.
Adds value at the end of the array.
Adds values to the end of the array with advanced options.
If an upsert operation results in an insert of a document, then this operator assigns the specified value to the field. If the update operation does not result in an insert, this operator does nothing.
Sets this field to the current date.
Sets this field to the current timestamp.
Returns a simplified (but equivalent) expression to the current expression.
Multiplies a field by the specified amount.
Writes the result of simplifying to a new BsonDocument.
Writes the result of simplifying this expression into writer.