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

Add pipeline stage to ChangeStreams example for Docs

    • Type: Icon: Task Task
    • 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
      NODE-1288 Fixed 3.0.2
      SCALA-368 Fixed
      PYTHON-1448 Fixed 3.6.1
      CSHARP-2148 Duplicate
      PERL-845 Won't Fix
      RUBY-1275 Fixed 2.5.1
      JAVA-2732 Fixed
      CXX-1494 Fixed 3.4.0
      PHPLIB-310 Fixed 1.3.0
      MOTOR-186 Fixed 1.2.1
      GODRIVER-194 Fixed 1.0.0-rc1
      CDRIVER-2463 Fixed 1.10.0
      $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 NODE-1288 Fixed 3.0.2 SCALA-368 Fixed PYTHON-1448 Fixed 3.6.1 CSHARP-2148 Duplicate PERL-845 Won't Fix RUBY-1275 Fixed 2.5.1 JAVA-2732 Fixed CXX-1494 Fixed 3.4.0 PHPLIB-310 Fixed 1.3.0 MOTOR-186 Fixed 1.2.1 GODRIVER-194 Fixed 1.0.0-rc1 CDRIVER-2463 Fixed 1.10.0

      In a previous ticket DRIVERS-414, included Example 1-3. This ticket is to add the Example 4 sections to the existing example :

      // Start Changestream Example 1
      
      MongoCursor<Document> cursor = inventory.watch().iterator();
      Document next = cursor.next();
      
      // End Changestream Example 1
      
      // Start Changestream Example 2
      
      MongoCursor<Document> cursor = 
      inventory.watch().fullDocument(FullDocument.UPDATE_LOOKUP).iterator();
      Document next = cursor.next();
      
      // End Changestream Example 2
      
      // Start Changestream Example 3
      
      Document resumeToken = next.get("_id", Document.class);
      MongoCursor<Document> cursor = inventory.watch().resumeAfter(resumeToken).iterator();
      cursor.next();
      
      // End Changestream Example 3
      
      // Start Changestream Example 4
      
      List<Bson> pipeline = singletonList(Aggregates.match(Filters.or(
         Document.parse("{'fullDocument.username': 'alice'}"),
         Filters.in("operationType", asList("delete")))));
      
      // End Changestream Example 4
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            rathi.gnanasekaran Rathi Gnanasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: