Modify Change Stream Output Examples

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: 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
              Reporter:
              Kay Kim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: