Fetch specific fields in a query
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
Protection queries are a particular type of MongoDB queries where you can specify fields you want to get in the output.
Another example where the projection parameter is used:
`
db.writers.find( { "author": "Gaurav Mandes" }, { _id:0, author:1, title:1 } )
`
In the example above, the _id field is excluded, which automatically gets added, and the title and author fields are displayed.
Contributor guide
Research direction
The issue provides a MongoDB projection example but names no files, tests, or entry points. Start by tracing how query parameters are exposed and passed to MongoDB, then determine how selecting and excluding fields should fit the ODM API. Done means the example projection is supported and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100