Automattic / Automattic/monk

Determine if findOneAndUpdate({upsert:true}) created a new doc or updated an existing one.

Open
#218 1 comment 1 reaction 0 assignees View on GitHub
discussion enhancement
Dominant language
JavaScript
Stars
1.8k
Forks
180
PR merge metrics
No merged PRs in 30d

Description

Does monk provide any indication for this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating Monk's findOneAndUpdate API implementation and documentation, then check how MongoDB reports whether an upsert inserted or updated a document. The issue does not name a file or test; done means documenting or exposing a clear way to determine which outcome occurred.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.