diff options
author | Katherine Wu <katherine.wu@mongodb.com> | 2020-04-07 12:55:14 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-16 16:41:37 +0000 |
commit | 2b58a77d1d353d6727b02f145a93c41f2ee55812 (patch) | |
tree | 8ec55083480f467523d43e45ba2b897476504279 /src/mongo/dbtests | |
parent | 5a3b48b31445888d06b593055ffcd13fa0d701b4 (diff) | |
download | mongo-2b58a77d1d353d6727b02f145a93c41f2ee55812.tar.gz |
SERVER-46772 Use IDL to represent UpdateRequest
Diffstat (limited to 'src/mongo/dbtests')
-rw-r--r-- | src/mongo/dbtests/query_stage_update.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/dbtests/query_stage_update.cpp b/src/mongo/dbtests/query_stage_update.cpp index f576c8199b9..c135f1d916d 100644 --- a/src/mongo/dbtests/query_stage_update.cpp +++ b/src/mongo/dbtests/query_stage_update.cpp @@ -210,7 +210,8 @@ public: // Collection should be empty. ASSERT_EQUALS(0U, count(BSONObj())); - UpdateRequest request(nss); + auto request = UpdateRequest(); + request.setNamespaceString(nss); // Update is the upsert {_id: 0, x: 1}, {$set: {y: 2}}. BSONObj query = fromjson("{_id: 0, x: 1}"); @@ -282,7 +283,8 @@ public: vector<RecordId> recordIds; getRecordIds(coll, CollectionScanParams::FORWARD, &recordIds); - UpdateRequest request(nss); + auto request = UpdateRequest(); + request.setNamespaceString(nss); // Update is a multi-update that sets 'bar' to 3 in every document // where foo is less than 5. @@ -386,7 +388,8 @@ public: OpDebug* opDebug = &CurOp::get(_opCtx)->debug(); Collection* coll = ctx.getCollection(); ASSERT(coll); - UpdateRequest request(nss); + auto request = UpdateRequest(); + request.setNamespaceString(nss); UpdateDriver driver(_expCtx); const int targetDocIndex = 0; // We'll be working with the first doc in the collection. const BSONObj query = BSON("foo" << BSON("$gte" << targetDocIndex)); @@ -477,7 +480,8 @@ public: OpDebug* opDebug = &CurOp::get(_opCtx)->debug(); Collection* coll = ctx.getCollection(); ASSERT(coll); - UpdateRequest request(nss); + auto request = UpdateRequest(); + request.setNamespaceString(nss); UpdateDriver driver(_expCtx); const int targetDocIndex = 10; const BSONObj query = BSON("foo" << BSON("$gte" << targetDocIndex)); |