PYTHON-1621 Modify change stream output example for manual (#370)
This commit is contained in:
parent
88ab7ed4ea
commit
9aa7adab0f
@ -695,12 +695,8 @@ class TestSampleShellCommands(unittest.TestCase):
|
||||
|
||||
# Start Changestream Example 4
|
||||
pipeline = [
|
||||
{"$match": {
|
||||
"$or": [
|
||||
{"fullDocument.username": "alice"},
|
||||
{"operationType": {"$in": ["delete"]}}]
|
||||
}
|
||||
}
|
||||
{'$match': {'fullDocument.username': 'alice'}},
|
||||
{'$addFields': {'newField': 'this is an added field!'}}
|
||||
]
|
||||
cursor = db.inventory.watch(pipeline=pipeline)
|
||||
document = next(cursor)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user