art049 / art049/odmantic

Fetch specific fields in a query

Open
#64 11 comments 0 reactions 0 assignees View on GitHub
feature
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.