Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-976

.watch() should either typecheck pipeline argument or allow omitting it

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.6
    • Affects Version/s: None
    • Component/s: Shell API
    • Labels:
      None
    • 2
    • Needed
    • Hide

      The first argument (the pipeline) of db.watch(), mongo.watch(), collection.watch() is optional now, i.e. .watch(options) is valid now just like .watch(), .watch(pipeline) and .watch(pipeline, options) already were.

      Show
      The first argument (the pipeline) of db.watch(), mongo.watch(), collection.watch() is optional now, i.e. .watch(options) is valid now just like .watch(), .watch(pipeline) and .watch(pipeline, options) already were.
    • Iteration Kampala

      Right now, db.resources.watch( { maxAwaitTimeMS: 20000 }) works in mongosh, even though it did not in the legacy shell. We should either:

      • Enforce that the first argument is an array, if it was passed, or
      • Allow omitting the pipeline argument and test that behavior.

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: