prepareForget
Definition
Prepares to "forget" (redact) data. Wrapper for the forget command.
Syntax
db.prepareForget(collection,filter [,minVersion,maxVersion,inclusiveRange(true|false)])
Field | Type | Mandatory | Description |
---|---|---|---|
collection | string | Mandatory | The collection name which the documents belongs to. |
filter | document | Mandatory | A filter identifying the documents to be forgotten |
minVersion, maxVersion | number | Optional | If specified, only purge the documents that are current within this range of versions. |
inclusiveRange | boolean | Optional | If true, only forget documents that are within the range of versions ONLY. This means that any version outside of the range is unaffected. If false, then documents within the range will be forgotten even if they also exist in versions outside of the range. See forget for details |
Example
db.prepareForget('docHistory3385955',{x:4},0,8000)
{
"ok" : 1,
"forgetId" : NumberLong(14),
"password" : "5064ee4a-22f6-4cf8-a44e-8c2559322e1d",
"forgetSummary" : {
"documentsToBeForgotten" : NumberLong(10),
"uniqueDocuments" : NumberLong(10)
}
}
See also
Updated over 5 years ago