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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.6
    • Component/s: Shell API
    • Labels:
      None
    • Story Points:
      2
    • Documentation Changes:
      Needed
    • Documentation Changes Summary:
      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.
    • Sprint:
      Iteration Kampala

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: