-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Query
-
None
-
Fully Compatible
I could not work out how to run listlocalsessions (https://docs.mongodb.com/manual/reference/operator/aggregation/listLocalSessions/) in Ruby because there is, as far as I can tell, no support for database-level aggregation as specified in https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#database-level-aggregation.
Workaround:
client.database.command({'aggregate'=>1,pipeline:[{'$listLocalSessions'=>{}}],cursor:{}}).first['cursor']['firstBatch']
But, when issuing commands directly we do not get back an enumerable, hence the user would have to manually iterate (or be content with a single batch of results).
- is depended on by
-
DRIVERS-572 Support Database-level aggregate helper
- Development Complete
-
DRIVERS-541 Support running commands as aggregation
- Closed
- is duplicated by
-
RUBY-1611 Support running commands as aggregation
- Closed
-
RUBY-1862 Database-level aggregation should be tested on server versions 3.6+
- Closed
- links to