Skip to content

Glossary: MongoDB

Guarded update

An update whose filter includes a condition, such as `stock: { $gte: 5 }`, so check and change happen in one atomic step. If `modifiedCount` is 0, the condition failed.

Where the book teaches it

Related terms

Atomic$inc