diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-07-09 04:15:56 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2014-07-18 15:16:15 -0400 |
commit | 9066a06214f115c182c2b83ed40e939e05b9c1f8 (patch) | |
tree | 4239137f6521f1d1d77ecc3c3be89b6e6779f7f1 /src/mongo/db/ops/update_request.h | |
parent | 3c3d656668e26645492ee3dafb241631352426d4 (diff) | |
download | mongo-9066a06214f115c182c2b83ed40e939e05b9c1f8.tar.gz |
SERVER-13961 Pass OperationContext into WhereCallbackReal
There are no functional changes in this commit, just preparation for the
subsequent one, which will add operation context to the JS execution
scope.
Diffstat (limited to 'src/mongo/db/ops/update_request.h')
-rw-r--r-- | src/mongo/db/ops/update_request.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/db/ops/update_request.h b/src/mongo/db/ops/update_request.h index db0dcbf1e5e..5ed6eca209a 100644 --- a/src/mongo/db/ops/update_request.h +++ b/src/mongo/db/ops/update_request.h @@ -42,8 +42,9 @@ namespace mongo { class UpdateRequest { public: - inline UpdateRequest(const NamespaceString& nsString) - : _nsString(nsString) + inline UpdateRequest(OperationContext* txn, const NamespaceString& nsString) + : _txn(txn) + , _nsString(nsString) , _god(false) , _upsert(false) , _multi(false) @@ -131,6 +132,10 @@ namespace mongo { return _lifecycle; } + inline OperationContext* getOpCtx() const { + return _txn; + } + const std::string toString() const { return str::stream() << " query: " << _query @@ -144,6 +149,9 @@ namespace mongo { } private: + // Not owned. Must live as long as the request lives. + OperationContext* _txn; + const NamespaceString& _nsString; // Contains the query that selects documents to update. |