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
    • None

      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: