MongoDB Query Language (MQL) Field Update Operators
Field update operators modify field values within documents during update operations. These operators enable you to set, unset, rename, increment, multiply, and perform other field-level modifications, providing precise control over document structure and content updates.
$currentDate
The $currentDate operator sets the value of a field to the current date, either as a Date or a timestamp.
$inc
The $inc operator increments the value of a field by a specified amount.
$mul
The $mul operator multiplies the value of a field by a specified number.
$rename
The $rename operator allows renaming fields in documents during update operations.
$setOnInsert
The $setOnInsert operator sets field values only when an upsert operation results in an insert of a new document.