dropDatabase
On this page本页内容
Synopsis提要
Description描述
_id | Document | resumeToken for the resumeAfter parameter when resuming a change stream. resumeAfter参数的resumeToken。_id object has the following form: _id对象具有以下形式:
{
_data type depends on the MongoDB versions and, in some cases, the feature compatibility version (fCV) at the time of the change stream's opening or resumption. _data类型取决于MongoDB版本,在某些情况下,还取决于更改流打开或恢复时的功能兼容性版本(fCV)。_data types._data类型的完整列表。resumeToken, see Resume a Change Stream. resumeToken恢复更改流的示例,请参阅恢复更改流。 |
clusterTime | Timestamp | clusterTime value: the time when the transaction was committed.clusterTime值:事务提交的时间。clusterTime may not all relate to the same transaction. clusterTime的事件可能并不都与同一事务相关。lsid and txnNumber in the change stream event document. lsid和txnNumber的组合。 |
lsid | document | |
ns | document | |
ns.db | string | |
operationType | string | dropDatabase for these change events. dropDatabase值。 |
txnNumber | NumberLong | lsid一起,是一个有助于唯一识别事务的数字。 |
wallTime | ISODate | wallTime differs from clusterTime in that clusterTime is a timestamp taken from the oplog entry associated with the database operation event. wallTime与clusterTime的不同之处在于,clusterTime是从与数据库操作事件关联的oplog条目中获取的时间戳。 |
Example实例
The following example illustrates a 以下示例说明了dropDatabase event:dropDatabase事件:
{
"_id": { <Resume Token> },
"operationType": "dropDatabase",
"clusterTime": <Timestamp>,
"wallTime": <ISODate>,
"ns": {
"db": "engineering"
}
}
A 在为数据库生成dropDatabase command generates a drop event for each collection in the database before generating a dropDatabase event for the database.dropDatabase事件之前,dropDatabase命令会为数据库中的每个集合生成一个drop事件。
A dropDatabase event leads to an invalidate event for change streams opened against its own ns.db database.dropDatabase事件会导致针对其自身的ns.db数据库打开的更改流的invalidate事件。