summaryrefslogtreecommitdiff
path: root/src/mongo/shell/mongo.js
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2020-02-10 10:16:59 +0100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-10 13:08:24 +0000
commit1a8fea4b5a2fe7ec14d88d1ce4e7c8a1eaaa03cd (patch)
tree2c15f4dc5129ffa398ff4f07938754b62bbfb8a8 /src/mongo/shell/mongo.js
parent6c9c0b19d5980f065e1ff2ad624bb8d18bb88fe5 (diff)
downloadmongo-1a8fea4b5a2fe7ec14d88d1ce4e7c8a1eaaa03cd.tar.gz
SERVER-45807 Add change stream stage to fetch pre-image for update/replace/delete events
create mode 100644 jstests/change_streams/lookup_pre_image.js create mode 100644 jstests/noPassthrough/change_stream_pre_image_lookup_whole_db_whole_cluster.js create mode 100644 jstests/noPassthrough/change_stream_preimages_fail_on_mongos.js create mode 100644 src/mongo/db/pipeline/document_source_lookup_change_pre_image.cpp create mode 100644 src/mongo/db/pipeline/document_source_lookup_change_pre_image.h
Diffstat (limited to 'src/mongo/shell/mongo.js')
-rw-r--r--src/mongo/shell/mongo.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/shell/mongo.js b/src/mongo/shell/mongo.js
index 481aff7c6ad..2503a989d74 100644
--- a/src/mongo/shell/mongo.js
+++ b/src/mongo/shell/mongo.js
@@ -633,6 +633,16 @@ Mongo.prototype._extractChangeStreamOptions = function(options) {
delete options.startAtOperationTime;
}
+ if (options.hasOwnProperty("fullDocumentBeforeChange")) {
+ changeStreamOptions.fullDocumentBeforeChange = options.fullDocumentBeforeChange;
+ delete options.fullDocumentBeforeChange;
+ }
+
+ if (options.hasOwnProperty("allChangesForCluster")) {
+ changeStreamOptions.allChangesForCluster = options.allChangesForCluster;
+ delete options.allChangesForCluster;
+ }
+
return [{$changeStream: changeStreamOptions}, options];
};