Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-45841

db.aggregate() fails without square brackets

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Shell
    • Query Execution
    • ALL

      In the Mongo shell, a command such as

      db.aggregate({ $currentOp: {} })
      

      fails unless it's written with square brackets:

      db.aggregate([{ $currentOp: {} }])
      

      This is inconsistent with the behavior of aggregate on a collection.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            david.golub@mongodb.com David Golub
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: