summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/update_request.h
diff options
context:
space:
mode:
authorKatherine Wu <katherine.wu@mongodb.com>2020-04-27 11:32:40 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-28 21:57:39 +0000
commit53e1d78e950bb98f84fc0e0e48c341404f7f90ed (patch)
tree2b8c8cfb0fa31e1ec7b07d9f643947422368edd9 /src/mongo/db/ops/update_request.h
parentf0cf2ca62b4957587e5fe3a897b35b9a54873e23 (diff)
downloadmongo-53e1d78e950bb98f84fc0e0e48c341404f7f90ed.tar.gz
SERVER-46708 Support let variables in update command
Diffstat (limited to 'src/mongo/db/ops/update_request.h')
-rw-r--r--src/mongo/db/ops/update_request.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/ops/update_request.h b/src/mongo/db/ops/update_request.h
index 5570f544c3e..6404b5dcd70 100644
--- a/src/mongo/db/ops/update_request.h
+++ b/src/mongo/db/ops/update_request.h
@@ -129,6 +129,14 @@ public:
return _runtimeConstants;
}
+ void setLetParameters(const boost::optional<BSONObj>& letParameters) {
+ _letParameters = letParameters;
+ }
+
+ const boost::optional<BSONObj>& getLetParameters() const {
+ return _letParameters;
+ }
+
void setArrayFilters(const std::vector<BSONObj>& arrayFilters) {
_updateOp.setArrayFilters(arrayFilters);
}
@@ -287,6 +295,9 @@ private:
// System-defined constant values which may be required by the query or update operation.
boost::optional<RuntimeConstants> _runtimeConstants;
+ // User-defined constant values to be used with a pipeline-style update. These can be specified
+ // by the user for each individual element of the 'updates' array in the 'update' command.
+ boost::optional<BSONObj> _letParameters;
// The statement id of this request.
StmtId _stmtId = kUninitializedStmtId;