Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4646

Support namespace queries in ChangeStreamDocument pipelines

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 2.19.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      For example:

      // watch client filtering on database name
      var pipeline = new EmptyPipelineDefinition<ChangeStreamDocument<BsonDocument>>()
          .Match(x => x.DatabaseNamespace.DatabaseName.StartsWith("MyPrefix"));
      var changeStream = client.Watch(pipeline);
      
      // watch client filtering on collection name
      var pipeline = new EmptyPipelineDefinition<ChangeStreamDocument<BsonDocument>>()
              .Match(x => x.CollectionNamespace.CollectionName.StartsWith("MyPrefix"));
      var changeStream = client.Watch(pipeline);
      
      // watch database filtering on collection name
      var pipeline = new EmptyPipelineDefinition<ChangeStreamDocument<BsonDocument>>()
          .Match(x => x.CollectionNamespace.CollectionName.StartsWith("MyPrefix"));
      var changeStream = database.Watch(pipeline);
      

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            boris.dogadov@mongodb.com Boris Dogadov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: