The id functions as an opaque token for use when resuming an interrupted change stream.id用作不透明标记,用于恢复中断的更改流。
The timestamp from the oplog entry associated with the event. 与事件关联的oplog条目的时间戳。For events that happened as part of a multi-document transaction, the associated change stream notifications will have the same clusterTime value, namely the time when the transaction was committed. 对于作为多文档事务的一部分发生的事件,关联的更改流通知将具有相同的clusterTime值,即事务提交的时间。On a sharded cluster, events that occur on different shards can have the same clusterTime but be associated with different transactions or even not be associated with any transaction. 在分片集群上,发生在不同分片上的事件可以具有相同的clusterTime,但与不同的事务关联,甚至不与任何事务关联。To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document.要识别单个事务的事件,可以在变更流事件文档中使用lsid和txnNumber的组合。
The UUID (Binary subtype 4) of the collection that the operation was performed on.对其执行操作的集合的UUID(二进制子类型4)。
Only present when the 仅当启用showExpandedEvents
flag is enabled.showExpandedEvents
标志时才显示。
NOTE: collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers flag is enabled.如果启用promoteBuffers标志,collectionUUID将转换为NodeJS缓冲区。
For unsharded collections this contains a single field 对于未共享的集合,它包含一个字段_id
. _id
。For sharded collections, this will contain all the components of the shard key对于分片集合,它将包含分片键的所有组件
This is only set if 仅当fullDocument
is set to 'updateLookup'
Contains the point-in-time post-image of the modified document if the post-image is available and either 'required' or 'whenAvailable' was specified for the 'fullDocument' option when creating the change stream.fullDocument
设置为“updateLookup”时才设置此项。如果发布图像可用,并且在创建更改流时为“fullDocument”选项指定了“必需”或“可用时”,则包含修改后文档的时间点发布图像。
Contains the pre-image of the modified or deleted document if the pre-image is available for the change event and either 'required' or 'whenAvailable' was specified for the 'fullDocumentBeforeChange' option when creating the change stream. 如果预映像可用于更改事件,并且在创建更改流时为fullDocumentBeforeChange
选项指定了“required”或“whenAvailable”,则包含修改或删除的文档的预映像。If 'whenAvailable' was specified but the pre-image is unavailable, this will be explicitly set to null.如果指定了“whenAvailable”,但预映像不可用,则将显式设置为空。
The identifier for the session associated with the transaction. 与事务关联的会话的标识符。Only present if the operation is part of a multi-document transaction.仅当操作是多文档事务的一部分时才存在。
Namespace the update event occurred on发生更新事件的命名空间
Describes the type of operation represented in this change notification描述此更改通知中表示的操作类型
The transaction number. 事务记录编号。Only present if the operation is part of a multi-document transaction.仅当操作是多文档事务的一部分时才存在。
NOTE: txnNumber can be a Long if promoteLongs is set to false如果promoteLongs设置为false
,则txnNumber可以是Long
Contains a description of updated and removed fields in this operation包含此操作中更新和删除字段的说明
Generated using TypeDoc
http://mongodb.asprain.cn/v5.3/reference/change-events/#update-event