Grokking MongoDB
Vote

0% completed

​

More Field Update Operators

What if an update should write a value only when it is lower than the current one, or only when the document is new? Five more field update operators handle cases like these, where the change depends on the field's name, its current value, the clock, or whether the update inserts a document.

OperatorWhat it does to the field
$renameChanges its name
$minWrites the value only if the value is lower than the current one
$maxWrites the value only if the value is higher than the current one
`$currentDate

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content