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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.0.6
    • Affects Version/s: None
    • Component/s: Shell API
    • None
    • 2
    • Iteration Kampala
    • 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.

      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
              Reporter:
              Anna Henningsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: