-
Type: New Feature
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
In https://jira.mongodb.org/browse/MONGOID-5401 is is requested that tally takes multiple arguments. While this could be theoretically useful, I think it is too specific of an optimization to be part of Mongoid itself.
To better support use cases where the application just wants to return raw data from the database without creating model instances, we could add a method to Criteria to return the results of query execution as BSON::Document instances without instantiating models.
This is essentially an inverse of MONGOID-5347.
Note that this ticket won't help specifically with the tally request in MONGOID-5401, because tally uses the aggregation pipeline. In that case the user would need to construct their own aggregation pipeline.
The result set should be iterated in batches
It should be possible to access each document in a convenient manner, e.g. like `each`
Consider de-mongoizing the return values
- is duplicated by
-
MONGOID-5391 Add Criteria#pluck_each method
- Closed
- is related to
-
MONGOID-5728 Investigate support for data frames (polars-ruby)
- Backlog
- related to
-
MONGOID-5347 Return model instances from aggregation
- Backlog