diff options
author | Charlie <charlie.swanson@mongodb.com> | 2015-04-14 10:27:18 -0400 |
---|---|---|
committer | Charlie <charlie.swanson@mongodb.com> | 2015-04-14 10:27:18 -0400 |
commit | 7a36b1598c45ea07a4713d4630fee204ff782e96 (patch) | |
tree | 4f8f67db69d5ac3f7412f1d136416f534fefd135 /src/mongo/db/ops/update_result.h | |
parent | 9637c0ae2721a07386af4fb4c402ee061ed7532f (diff) | |
download | mongo-7a36b1598c45ea07a4713d4630fee204ff782e96.tar.gz |
SERVER-16063 Rewrite the findAndModify command.
Changed UpdateStage to return the prior or newly-updated version of
a document if request. also changed DeleteStage to return the deleted
document if requested.
Added explain support to the findAndModify command.
Diffstat (limited to 'src/mongo/db/ops/update_result.h')
-rw-r--r-- | src/mongo/db/ops/update_result.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mongo/db/ops/update_result.h b/src/mongo/db/ops/update_result.h index 250b9d1fe23..568da353554 100644 --- a/src/mongo/db/ops/update_result.h +++ b/src/mongo/db/ops/update_result.h @@ -43,8 +43,7 @@ namespace mongo { bool modifiers_, unsigned long long numDocsModified_, unsigned long long numMatched_, - const BSONObj& upsertedObject_, - const BSONObj& newObj_ ); + const BSONObj& upsertedObject_); // if existing objects were modified @@ -62,18 +61,13 @@ namespace mongo { // if something was upserted, the new _id of the object BSONObj upserted; - // For a non-multi update, the new version of the document. If we did an insert, this - // is the full document that got inserted (whereas 'upserted' is just the _id field). - BSONObj newObj; - const std::string toString() const { return str::stream() << " upserted: " << upserted << " modifiers: " << modifiers << " existing: " << existing << " numDocsModified: " << numDocsModified - << " numMatched: " << numMatched - << " newObj: " << newObj; + << " numMatched: " << numMatched; } }; |