Is the format for updateDescription.updatedFields the same as the format you would provide to a $set operation?
Hi Kevin,
The format would be the same as what $set operation would accept. For example if you have a database update operation as below:
db.collection.update({"_id":101}, {"$set":{"x":{"a":1, "b":1, "c":1}}})
the value of document output for the change event would be:
{ '_id': { '_data': '',
'_typeBits': b'\x01'},
'documentKey': {'_id': 101.0},
'fullDocument': { '_id': 101.0,
'x': {'a': 1.0, 'b': 1.0, 'c': 1.0}},
'ns': {'coll': 'collection', 'db': 'database'},
'operationType': 'update',
'updateDescription': { 'removedFields': [],
'updatedFields': { 'x': { 'a': 1.0,
'b': 1.0,
'c': 1.0}}}}
See also Change Streams and Change Stream Examples
Regards,
Wan.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/4Ayc73sOJkk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/3df23fcb-d7a3-4c53-b138-db7d1acf4ec8%40googlegroups.com.