[CSHARP-4646] Support namespace queries in ChangeStreamDocument pipelines Created: 08/May/23  Updated: 18/May/23  Resolved: 17/May/23

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 2.19.2

Type: Task Priority: Unknown
Reporter: Boris Dogadov Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CSHARP-4645 WatchAsync() signatures are not consi... Closed
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed
Documentation Changes Summary:

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?


 Description   

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);



 Comments   
Comment by Githook User [ 18/May/23 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-4646: Support namespace queries in ChangeStreamDocument pipelines.
Branch: v2.19.x
https://github.com/mongodb/mongo-csharp-driver/commit/9eaf604f448586b013a3fc9b26fcb26bc5f4b4aa

Comment by Githook User [ 17/May/23 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-4646: Support namespace queries in ChangeStreamDocument pipelines.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/a1015c4a60248bf74ce78eae33f0705ec1a845fb

Generated at Wed Feb 07 21:48:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.