diff options
Diffstat (limited to 'src/mongo/db/query/cursor_response.h')
-rw-r--r-- | src/mongo/db/query/cursor_response.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/query/cursor_response.h b/src/mongo/db/query/cursor_response.h index ce1950fe104..ca81974e78b 100644 --- a/src/mongo/db/query/cursor_response.h +++ b/src/mongo/db/query/cursor_response.h @@ -179,9 +179,11 @@ public: static std::vector<StatusWith<CursorResponse>> parseFromBSONMany(const BSONObj& cmdResponse); /** - * Constructs a CursorResponse from the command BSON response. + * Constructs a CursorResponse from the command BSON response. If 'cmdResponse' is not owned, + * the second argument should be the object that owns the response. */ - static StatusWith<CursorResponse> parseFromBSON(const BSONObj& cmdResponse); + static StatusWith<CursorResponse> parseFromBSON(const BSONObj& cmdResponse, + const BSONObj* ownedObj = nullptr); /** * A throwing version of 'parseFromBSON'. |