upsertedIds
UpsertedIds is a term commonly used in the context of database operations, particularly in MongoDB, a popular NoSQL database. The term is a combination of "update" and "insert," and it refers to the process of updating a document if it exists, or inserting a new document if it does not. This operation is atomic, meaning it is performed in a single step, ensuring data consistency.
When an upsert operation is performed, the database returns an array of upsertedIds. This array contains the
UpsertedIds can be particularly useful in scenarios where the existence of a document is uncertain, and the