Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-537

Modify Change Stream Output Examples

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: Docs Examples
    • Labels:
      None
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      PYTHON-1621 Fixed 3.8
      CSHARP-2343 Fixed
      RUBY-1413 Fixed 2.13.0.rc1
      PHPLIB-381 Fixed 1.4.3
      MOTOR-263 Fixed 2.1
      CDRIVER-2774 Fixed 1.13.0
      JAVA-2973 Fixed
      SWIFT-612 Done
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion PYTHON-1621 Fixed 3.8 CSHARP-2343 Fixed RUBY-1413 Fixed 2.13.0.rc1 PHPLIB-381 Fixed 1.4.3 MOTOR-263 Fixed 2.1 CDRIVER-2774 Fixed 1.13.0 JAVA-2973 Fixed SWIFT-612 Done

      Hi – for https://docs.mongodb.com/manual/changeStreams/#modify-change-stream-output
      we seem to be missing Modify Change Stream Output examples – not sure what the process was for the example 4, guessing it was some last minute one-off for the node and java. In any case, if we could have example 4 (using node.js as the template) for the following drivers:

      • Python
      • PHP
      • Motor
      • C
      • C#
      • Ruby
      // Start Changestream Example 4
       
      const pipeline = [
        { $match: { 'fullDocument.username': 'alice' } },
        { $addFields: { newField: 'this is an added field!' } }
      ];
      const collection = db.collection('inventory');
      const changeStream = collection.watch(pipeline);
      const next = await changeStream.next();
      
      // End Changestream Example 4
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: