Improve $cond or introduce a new pipeline operator for conditional stages

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Query
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As far as I'm aware you can use $cond as if..then..else but only for expressions.

      It would be useful if whole pipeline stages could be executed conditionally.

      i.e.

      if <input document satisifies condition> then
      execute $group stage (or whatever)
      else
      execute a different $group stage (or whatever)

            Assignee:
            Backlog - Query Team (Inactive)
            Reporter:
            Andrew Harris
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: