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

Add support to construct Documents with an initializer list

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.4
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 12 (04/04/16)

      Description

      Would allow something like this:

      Document document = {{"a", 1}, {"b", "q"}};
      

      instead of the current syntax, which can get hard to read with increasing numbers of fields:

      Document document = DOC("a" << 1 << "b" << "q");
      

        Attachments

          Activity

            People

            Assignee:
            charlie.swanson Charlie Swanson
            Reporter:
            charlie.swanson Charlie Swanson
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: