Automattic / Automattic/mongoose

[Feature] support named parameters

Open
#10,367 18 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
27.5k
Forks
4k
Avg merge
2d 5h
Merged PRs (30d)
32

Description

re https://github.com/Automattic/mongoose/pull/10360#issuecomment-862245274
It would be nice if we support named parameters for mongoose methods.
It should be straightforward to implement, I'll start with the following:
* Model.find
* Model.findOne
* Model.updateOne
* Model.updateMany
* Model.countDocuments
* Model.validate
* Model.aggregate
* Model.exists

Then we can decide what other functions we can apply the pattern to.

Contributor guide

Open the contributing guide

Research direction

Read the linked pull request discussion first, then inspect the implementations of Model.find, Model.findOne, Model.updateOne, Model.updateMany, Model.countDocuments, Model.validate, Model.aggregate, and Model.exists. Done means the listed methods consistently support named parameters and the behavior is covered by appropriate tests, with the scope for additional methods clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb, nodejs
Domain
backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.