upsert property

bool upsert
getter/setter pairinherited

If true, perform an insert if no documents match the query. If both upsert and multi are true and no documents match the query, the update operation inserts only a single document.

Implementation

bool upsert = false;