Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1721

Implement database-level aggregation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.10.0.rc0
    • 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).

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: